Read file line by line


/ Published in: Bash
Save to your folder(s)

bash, read, line

1. $ cat myFile | readByLine
2. $ readByLine


Copy this code and paste it in your HTML
  1. while read line; do
  2. echo $line
  3. done
  4.  
  5. # or
  6.  
  7. while read line; do
  8. echo $line
  9. done < myFile

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.