linux 批量替换

Posted 613

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux 批量替换相关的知识,希望对你有一定的参考价值。

sed -i "s/新内容/原内容/g" `ls *.html`
sed -i "s/新内容/原内容/g/g" `ls *.php`
sed -i "s/s/新内容/原内容/g/g" `ls **/*.php`
sed -i "s/s/新内容/原内容/g/g" `ls **/**/*.php`

  

以上是关于linux 批量替换的主要内容,如果未能解决你的问题,请参考以下文章

linux在vim下怎么批量替换或者注释?

linux下批量替换文件内容

shell :linux sed 批量替换字符串

Linux批量查找与替换

linux系统批量替换文件中的字符

Linux文件名替换