How can I use a while loop to read a file that has spaces.
Ex. input.file looks like this:
Field 1 Field 2 Field 3
cat input.file | while read field1 field2 field3
do
...
done
The problem I'm having is that the while loop is breaking up the fields into 6 fields instead of 3.
Any help would be greatly appreciated.
Thanks,
John
Ex. input.file looks like this:
Field 1 Field 2 Field 3
cat input.file | while read field1 field2 field3
do
...
done
The problem I'm having is that the while loop is breaking up the fields into 6 fields instead of 3.
Any help would be greatly appreciated.
Thanks,
John