Read a File Line By Line

10 Mar 2014

The easiest way to read a file line-by-line is to use the following pattern:

#!/bin/bash

while read line
do
  echo -e "$line \n"
done <file.txt