There are many ways to handle file operations in UNIX. here is the one way of paring the input file line by line in shell script. If you know the basic shell scripting then it will be easy to understand.
cat $filename | while read line
If You need more click here www.iguddy.com