All Questions
2 questions
0
votes
1
answer
108
views
want to check an element of array is present in first line of a file
while read line ;
do
if grep -q "${MYARRAY[$i]}" <<< "$line";
then
echo its present
else
echo its not
fi
i+=1
done < keyans.txt
here keyans.txt has all ...
2
votes
2
answers
369
views
Weird output when using ssh inside a loop over a file
The script is to read a file that contains multiple lines, each line containing a tab-delimited array. I want to execute some remote commands that take those array elements as arguments, with sudo ...