How to read a linux file line by line

Closed
anonymous - Updated on Mar 30, 2018 at 04:55 PM
xpcman Posts 19528 Registration date Wednesday 8 October 2008 Status Contributor Last seen 15 June 2019 - 30 Mar 2018 à 17:45
Hi!
thank you for the example

while read line; do echo "$ line \n"; done < file.txt

you should correct the $ line without space, and it works great.
I did it.

while read line; do echo "$line \n"; done < file.txt

thanks!
Related:

1 response

xpcman Posts 19528 Registration date Wednesday 8 October 2008 Status Contributor Last seen 15 June 2019 1,824
30 Mar 2018 à 17:45
thanks for the info