sed 同时删除单引号和双引号 [英] sed to remove single and double quotes at the same time
本文介绍了sed 同时删除单引号和双引号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从文件中删除单引号和双引号.我可以在单个 sed 命令中完成吗?
I am trying to remove single quotes and double quotes from a file. Can I do it in a single sed command?
我正在尝试:
sed 's/\"//g;s/\'//g' txt file
但得到这个错误
`' ' 不匹配.
请帮忙.
推荐答案
另一种可能是使用 tr
:
tr -d \'\" file
这篇关于sed 同时删除单引号和双引号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文