Linux 批量替换的一种实现方式

替换某目录下所有文件中的某个字符:

sed -i 's/origin_str/new_str/g' `grep origin_str -rl ./`

origin_str:被替换的字符串;

new_str:替换字符串

grep命令使用反引号引用。

https://gxnotes.com/article/236277.html

原文地址:https://www.cnblogs.com/xiaoerlang/p/6555543.html