There are multiple ways to skin this cat. For now one of the simplest.
#!/bin/sh
while read LINE
do
...DO SOME STUFF WITH THE ${LINE}...
done <somefile.txt
Replace “somefile.txt” with the file you want to process.
I find it useful to set the window title of my terminals for long running processes so I can see at a glace what is happening in the window or where in the process running in that window is at. In scripts I will use the following:
echo "\033]0;Window for ${USER}\007"
Of course replace “Window for ${USER}” with whatever is appropriate for your use.