Forgot password
 Register account
View 151|Reply 0

sed

[Copy link]

3207

Threads

7846

Posts

51

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 | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-12 13:04 GMT+8

Powered by Discuz!

Processed in 0.013481 seconds, 25 queries