shell foreach line

Shell
cat file | while read -r a; do echo $a; done
Source

Also in Shell: