Bash read file line by line into variable example. In Bash, reading lines from a file is pretty easy.