[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

bash script



I have a small problem which is bugging me.

Suppose I have a file abc.xyz, which has the following content.

line1col1 line1col2 line1col3
line2col1 line2col2 line2col3


Now, the following script 

for line in `cat abc.xyz`
do
	echo $line
done 


prints the file each element wise. i.e. The output is 

line1col1
line1col2
line1col3
line2col1
line2col2
line2col3

But I want to print line by line. ie. I want $line to contain an entire 
line, instead of each
element.

How do I do it ?

thanks,
-Saravanan