Click to See Complete Forum and Search --> : sed question


shaggy1112
06-16-2004, 09:56 AM
I am trying to use sed to remove apostrophes from a file.

sample line
---------------
You're very nice.
---------------

I want it to be
---------------
Youre very nice.
---------------

I have tried....
"sed 's/\'//g' file.txt", but I just get the > at the shell asking for more input.

What am I doing wrong?

serz
06-16-2004, 10:02 AM
sed 's/\'//g' file.txt > output

You can use tr if you want:

cat file.txt | tr -d "'" > output

maccorin
06-16-2004, 10:04 AM
cat <file> | sed "s/'//"

shaggy1112
06-16-2004, 10:12 AM
Thanks!

Can't believe I didn't think of the quotations.