read context line by line b using while loop« Back to Questions List

Hi , correct me if am wrong. we use the following syntax : while read -r row(where row is a variable) If we have to read a while line by line. Are there any other situations where we use this syntax / statement.
Posted by shikha_07
Asked on May 8, 2018 6:03 pm
0

You can use the following syntax to read the file line by line:

cat | while read row
do
echo ”$row”
sleep 1
done

Posted by Techie Globus
Answered On May 12, 2018 4:20 am