Posts Tagged ‘bash’

bash read lines in a file

Saturday, November 14th, 2009

Here’s some bash trick that can be handy when you need to process the lines in a file.

while read line
do
      echo $line;
      # do your thing about the line
done < filename