Bash Parse a file forwards / Parse a file in reverse (backwards) Bash shell has some very simple commands that can help you do everyday tasks. One of the main functions I need a script to do is to read each line in a file from beginning to end and do something with each line the script reads.