back reference error

Hi,

i am getting this error........

find ./ | sed '/\([a-z]\) \([a-z]\)/\2\1/'
Unrecognized command: /\([a-z]\) \([a-z]\)/\2\1/

Any idea???

regards
Apoorva Kumar

Yes, you aren't telling sed what command to execute! The regex is fine (haven't looked into the details), but sed needs to know what to do with the match if/when it finds it. i.e. If you want to just print the matching patterns, you still have to tell it to print them using the 'p' command.

thanks partner!!..I just missed to put a s there.

I have few file in my dir.....

abc 123
efg 567

I am trying this command.....

for file in `find ./|sed 's/^/\"/'|sed 's/$/\"/'`
do
echo $file
done

This is the output i am getting.........

"./"
"./.sh_history"
"./3rdPartytesting"
"./abc
123"
""
"./efg
456"
"./bkup"

The issue is there is an extra \n in the names of files which contains a space in them. Can you help me get a output like...

"./"
"./.sh_history"
"./3rdPartytesting"
"./abc 123"
""
"./efg 456"
"./bkup"

regards
Apoorva Kumar

Please any anwers??

regards
Apoorva Kumar

Pls don't bump-up posts if not answered immediately!

find . | sed 's/.*/"&"/'