IFS=$'\n'
for line in $(cat file.txt)
do
echo $line
done
OR
while read line
do
echo $line
done < file
[While loop is the easiest method but it obliterates the formatting of lines including spaces and tabs.]
for line in $(cat file.txt)
do
echo $line
done
OR
while read line
do
echo $line
done < file
[While loop is the easiest method but it obliterates the formatting of lines including spaces and tabs.]