在多个文件中使用grep,sed,xargs搜索和替换
Hujiuxiang
・1 分钟阅读
在多个文件中搜索和替换
grep -lr -e '<oldword>' * | xargs sed -i 's/<oldword>/<newword>/g'
s(搜索)/搜索字词/目标字/g(全局替换)