Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在单个命令行中使用 sed 命令删除以下行的标签,我希望输出为:- 发布日期:2013 年 9 月 10 日
<p><strong>Release date:</strong> September 10, 2013</p>
以下sed命令应删除标签:
sed
sed 's/<[^>]\+>//g' file
以下 awk 命令
awk 'gsub(/ *<[^>]*> */," ")'
试试下面
echo "<p><strong>Release date:</strong> September 10, 2013</p>" | sed 's/<[^>]*>//g'