I am able to read line by line in the first loop, but 2nd loop returns all lines at once.
I want the second loop to read line-by-line similsr to the outer loop. How can I resolve this?
firstlist=`<some command that returns multi-line o/p>`
if [ "x$firstlist" != "x" ] ; then
printf %s "$firstlist" |while IFS= read -r i
do
secondlist=`<some command that returns multi-line o/p>`
if [ "x$secondlist" != "x" ] ; then
printf %s "$secondlist" |while IFS= read -r j
do
doverify $i $j
done
else
echo "Some message"
fi
done
else
echo "some other message"
fi