bash iterate list new line code example Example: shell foreach line cat file | while read -r a; do echo $a; done