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

原文地址:https://www.cnblogs.com/zhuyeshen/p/12069317.html