Hello,
I am parsing a file with entries like "word1 word2 word3". I need to parse each line, so I used a "for" statement in a Bourne shell script. Something like this:
Code:
for line in `cat $file`
do
echo $line
done
In this simple example I want to print each line "word1 word2 word3" but instead it prints each word in a diferent line. The "for" statement seems not to distinguish between spaces and newlines...
Any idea to resolve this?
Thanks.