I\'ve read this question about how to read n characters from a text file using bash. I would like to know how to read a word at a time from a file that looks like:
Ordinarily, you should read from a file using a while read -r line loop. To do this and parse the words on the lines requires nesting a for loop inside the while loop.
Here is a technique that works without requiring nested loops: