1.批量查找当前目录下文件的包含的内容
grep -rn "要查找的文本" ./
2.批量查找并替换当前文件夹下的文件内容
sed -i 's#github.com/#github.com.cnpmjs.org/#g' `grep -rl "github.com" ./`
3.批量查找并替换某个文件夹下的文件内容
sed -i 's#github.com/#github.com.cnpmjs.org/#g' `grep -rl "github.com" 文件夹路径`
grep -rn "要查找的文本" ./
sed -i 's#github.com/#github.com.cnpmjs.org/#g' `grep -rl "github.com" ./`
sed -i 's#github.com/#github.com.cnpmjs.org/#g' `grep -rl "github.com" 文件夹路径`