Ravi Sir's Cards › AWS
Read a file line by line
This revision card explains Read a file line by line. It starts from the need that use while read. It describes IFS= keeps spaces. The how-to section notes -r keeps backslashes. An example on the card is pattern.
Read card text
What this card says
Why do we need it?
Use while read.
What is it?
IFS= keeps spaces.
How to do it
-r keeps backslashes.
Example
Pattern.
while IFS= read -r line; do