【发布时间】:2017-07-31 04:01:13
【问题描述】:
请有人帮忙。我需要在命令行中从特定的 HTML 标记(如 和 )中查找并删除逗号,但只能从此标记中查找和删除逗号。
例子:
...
<h3>Sample header, with some, text with commas</h3>
<h4>Sample header, with some, text with commas</h4>
<p>Loreipsum sit amet, dolor...</p>
...
我使用:
sed "/<h3>/,/<\/h3>/s/,//g"
但是这个命令从所有代码中删除逗号...我只需要
和 标记。
【问题讨论】:
标签: linux bash ubuntu sed terminal