批量替换某个目录下所有文件里的内容

 

 

cd 到目的目录
sed -i "s/查找的内容/替换后的内容/g" `grep -rl "查找的内容" ./`

参考来源:
https://www.cnblogs.com/aqicheng/p/11446791.html

posted on 2020-01-28 16:57  BPSO_mynotes  阅读(875)  评论(0编辑  收藏  举报

导航