bash 批量查找替换文件内容 Posted on 2017-11-29 In Tool 1grep -rl "192.168.1.1" |xargs -i sed -i 's/192.168.1.1/192.168.1.2/g' "{}" 将目录下所有文件的192.168.1.1替换成192.168.1.2