sed 结合正则表达式替换文件中指定开头的字符串

sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config  

原文地址:https://www.cnblogs.com/MUQINGFENG123/p/13563162.html