Hi Guys,
I have a file with the following lines
123456789 123456789
123456789XXXXXXXXX123456789
All the X here are actually spaces in the actual file.
To read this file line by line , I used the following code.
file=test.dat
cat $file | while read line
do
echo $line
done
In the output, I get something like this
123456789X123456789. All but 1 space have disappeared. Actually I need the spaces in tact. Please let me know where I went wrong.
Thanks in advance.
Dilip