shell命令修改文件内容

有个 test.txt 文件内容为  hello tom,现在修改成 hello jerry,并保存到test2.txt

sed 's/tom/jerry/g' test.txt >test2.txt
原文地址:https://www.cnblogs.com/xbblogs/p/8436404.html