如何替代重复的双引号? 例如,下面的行
"I need help with ""Unix"" scripting"
需要更改为
"I need help with 'Unix' scripting"
即代替""用'
答案 0 :(得分:0)
使用sed
:
$ var='"I need help with ""Unix"" scripting"'
$ echo $var
"I need help with ""Unix"" scripting"
$ echo $var | sed 's/""/'"'"'/g'
"I need help with 'Unix' scripting"