1、将当前目录下包含jack串的文件中,jack字符串替换为tom
sed -i “s/jack/tom/g” grep "jack" -rl ./
2、将某个文件中的jack字符串替换为tom
sed -i “s/jack/tom/g” test.txt
参考连接:http://blog.csdn.net/lizhi200404520/article/details/7968483
https://www.cnblogs.com/kings-9/p/7738724.html
1、将当前目录下包含jack串的文件中,jack字符串替换为tom
sed -i “s/jack/tom/g” grep "jack" -rl ./
2、将某个文件中的jack字符串替换为tom
sed -i “s/jack/tom/g” test.txt
参考连接:http://blog.csdn.net/lizhi200404520/article/details/7968483
https://www.cnblogs.com/kings-9/p/7738724.html
让时间为你证明