Forgot password?
 Register account
View 151|Reply 0

sed

[Copy link]

3156

Threads

7932

Posts

45

Reputation

Show all posts

hbghlyj posted 2022-6-24 02:28 |Read mode
gnu.org/software/sed/manual/sed.html
Example
  1. find ./ -type f -exec sed -i 's/ul class="litype_1" type="1"/ol/g' {} \;
Copy the Code
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 )

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | 快速注册

$\LaTeX$ formula tutorial

Mobile version

2025-6-8 10:34 GMT+8

Powered by Discuz!

Processed in 0.017229 second(s), 24 queries

× Quick Reply To Top Edit