I have a file with 3 fields separated by spaces & I want to extract each line one by one & then perform some processing on each one. I assumed I could do this:
for line in `cat my_file`
do
do my processing here ...
done
but this extracts each field (so it takes 3 iterations of the for loop to do one line). I'm sure I'm missing something obvious but I just can't think what.
Can anyone help?
for line in `cat my_file`
do
do my processing here ...
done
but this extracts each field (so it takes 3 iterations of the for loop to do one line). I'm sure I'm missing something obvious but I just can't think what.
Can anyone help?