2019独角兽企业重金招聘Python工程师标准>>> sed '/^echo/!s/text/subtext/g' 如果是以echo开始行首的行就不进行替换。 参考sed substitution conditional 转载于:https://my.oschina.net/u/191928/blog/618652