Wednesday 28 March 2012

Read a File line by line in a shell script

It is easy to read a file in a bash shell script using while loop.


FileName='example.txt'
while read LINE
do
  echo $LINE
done < $FileName

No comments:

Post a Comment