shell命令修改文件内容

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

sed 's/tom/jerry/g' test.txt >test2.txt

 

posted @ 2018-02-09 17:44  .追风逐月  阅读(14364)  评论(0编辑  收藏  举报