Shell Scripting: How to pick lines out of files by line number.
In a shell script (Linux), how would you pick out certain lines from a text file using line numbers. What I want to do is loop through each line of the file seperately. First, I want to read line 1, and perform an operation according to line 1's content, then I want to go to line 2, etc....
All I can find is how to pull lines from a file based on a pattern match (like grep). I want to get every line one at a time no matter what the pattern.
Each line only contains one word.
Thanks.
Louie.
|