06-03-2006
4,
0
Join Date: Jun 2006
Last Activity: 3 June 2006, 1:00 AM EDT
Posts: 4
Thanks Given: 0
Thanked 0 Times in 0 Posts
The problem is not with the
echo "-----" $LINE "-----"
but, it is in the
for i in `grep $LINE $FILENAME | cut -d'|' -f2`
The reason, the pattern in $LINE has embedded space char in it. So, when grep reads the $LINE, like --
grep this is also one $FILENAME | cut -d'|' -f2
thats where it fails.
The question is how to apply QUOTES around $LINE for grep, so that when grep expands it, it should do it like --
grep "this is also one" $FILENAME | cut -d'|' -f2
thanks,
s.