sed中''之间的单引号特殊处理需要'"'"' (两个单引号中两个双引号再最里面是目标一个单引号)
比如:
sed -i 's#<a id='"'"'img_logo'"'"' href="http://www.baidu.com/"</a>##g' test.txt
sed中''之间的单引号特殊处理需要'"'"' (两个单引号中两个双引号再最里面是目标一个单引号)
比如:
sed -i 's#<a id='"'"'img_logo'"'"' href="http://www.baidu.com/"</a>##g' test.txt