sed 批量替换多文件中的字符

6 年 ago jony sed 批量替换多文件中的字符已关闭评论

把所有文件里的字符http替换成https

grep http -rl ./文件或者目录/ | xargs sed -i "s/http/https/g"

###############################################################

先查找哪些文件中带有指定字符

grep -r 'minjs' ./

删除文件中带有指定字符的一行:

sed -i '/minjs/d' *.html