1834375 Members
2853 Online
110066 Solutions
New Discussion

SED functionality

 
SOLVED
Go to solution
Dave Walley
Frequent Advisor

SED functionality

Hi again.

I need to strip single quotes from a file and have been using the following string without success. Can anyone advise me on the correct solution.

sed -e 's/'//g'

Thanks.

Dave
why do i do this to myself
4 REPLIES 4
John Palmer
Honored Contributor
Solution

Re: SED functionality

Try changing your outer single quotes to double ones i.e.

sed -e "s/'//"

Should have the desired effect.
John Palmer
Honored Contributor

Re: SED functionality

As there are no spaces etc in the sed string then you can even get away with no outer quotes at all. Just 'backslash' the single quote:-

sed -e s/\'//g
James R. Ferguson
Acclaimed Contributor

Re: SED functionality

Dave:

sed s/\"//g

...JRF...
Vikas Khator
Honored Contributor

Re: SED functionality

Hi ,

sed -e "s/'//g" should do the thing.

You don't need to .
Keep it simple