Code:
cat filename.ext |while read line; do echo "${line}"; done
As you see,
cat filename.ext reads the file, and stores it in 'line' for each line encountered as the while progresses. You can replace the do method with whatever you wish, the trick is to load the file contents via
cat.
This line prints whatever lines are found in file "filename.ext".