Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sed to remove single and double quotes at the same time

Tags:

regex

sed

I am trying to remove single quotes and double quotes from a file. Can I do it in a single sed command?

I am trying :

sed 's/\"//g;s/\'//g' txt file

but get this error

`' ' is unmatched.

Please help.

like image 357
user2689092 Avatar asked Aug 16 '13 10:08

user2689092


1 Answers

Another possibility would be to use tr:

tr -d \'\" file
like image 168
twalberg Avatar answered Oct 07 '22 00:10

twalberg