Mon 12 Mar 2007
Linux Tip #6: Looping on lines of file in bash
Posted by dkaz under Linux, Programming
I discovered a large gap in my bash kung fun today - I had no idea how to loop on lines of data in a file.
It turns out that “while data” pulls off this trick quite nicely:
while read myline
do $myline
done < inputfile
