Hi,
I need to do something like
for i `ls -1 *.sql `
do
for k in `grep "MY TEXT" $j `
do
..
...
..
done
done
And one of the sql files may contain lines like
MY TEXT ABC
fkjgnhdfg
MY TEXT PQR
dfkljgn
MY TEXT XYZ
So a grep would return three lines and I want to work on the three lines separately, but with the command syntax I have in my script each line comes out as three lines because of the space in the three words.
Is there a way to make grep return one line and not three in the k-shell script.
Many Thanks,