REad Command

I am Doin the Following:

cat $filename | while read line
do
...
...

done

But the read commanfd ignores the leading spaces in a line .. i want to read the line with leading spaces.. please advice.

thanks in advance,
Bourne

Try the following :

while IFS="\n" read line
do
   echo "[$line]"
done < $filename

Jean-Pierre.

thanks a lot Jean-Pierre... It worked.. thanks again 4 the timely help! :slight_smile: