If you need to read each line from a file and perform some action with it, then you can use 'while' loop.
www.shellhacks.com