Home » Infrastructure » Unix » Adding special characters in a string with SED
Adding special characters in a string with SED [message #220873] Thu, 22 February 2007 08:28 Go to next message
libanori
Messages: 11
Registered: February 2007
Location: ireland
Junior Member




Hi


more testfile | sed s/","/",',"/g

the above statement works ok, but
I want to add the characther " instead the '
what is the syntax for that?

If do

more testfile | sed s/","/",","/g

I get an error msg
thanks.
Re: Adding special characters in a string with SED [message #220880 is a reply to message #220873] Thu, 22 February 2007 10:20 Go to previous messageGo to next message
shahnazurs
Messages: 240
Registered: June 2005
Location: India
Senior Member
Hi.

Try like below

more testfile | sed s/","/",\","/g

Thanks,
Shahnaz.
Re: Adding special characters in a string with SED [message #220896 is a reply to message #220873] Thu, 22 February 2007 11:55 Go to previous message
libanori
Messages: 11
Registered: February 2007
Location: ireland
Junior Member
It worked fine. Thanks a lot for your help.
Previous Topic: Directory permission
Next Topic: Mailx command doubt.
Goto Forum:
  


Current Time: Mon Nov 25 02:22:00 CST 2024