shell脚本修改文件

https://blog.csdn.net/qq_37674858/article/details/80066264

 

2.2 使用sed命令对文件中的字符替换

例如:将aaaa字符串修改为bbbb

[root@mdw zxy]# sed -i 's|aaaa|bbbb|' file1
[root@mdw zxy]# cat file1                  
Good Luck
Hello World !

bbbb

转载于:https://www.cnblogs.com/gcgc/p/10281223.html

posted @ 2019-12-19 18:06  那些年的代码  阅读(1655)  评论(0编辑  收藏  举报