找回密码
 快速注册
搜索
查看: 47|回复: 0

sed

[复制链接]

3149

主题

8386

回帖

6万

积分

$\style{scale:11;fill:#eff}꩜$

积分
65391
QQ

显示全部楼层

hbghlyj 发表于 2022-6-24 02:28 |阅读模式
gnu.org/software/sed/manual/sed.html
Example
  1. find ./ -type f -exec sed -i 's/ul class="litype_1" type="1"/ol/g' {} \;
复制代码

QQ图片20220401132641.png
replace all <ul type="1" class="litype_1"> tags (typically, html produced by Discuz) in current directory to <ol>
Currently I don't find a way to replace those matching end tags </ul> to </ol>(maybe need a xml parser)
but it should be fine in most cases (browsers fix tags automatically )

手机版|悠闲数学娱乐论坛(第3版)

GMT+8, 2025-3-4 15:43

Powered by Discuz!

× 快速回复 返回顶部 返回列表