sed条件不修改匹配

sed '/^echo/!s/text/subtext/g'

如果是以echo开始行首的行就不进行替换。

参考sed substitution conditional

转载于:https://my.oschina.net/u/191928/blog/618652

猜你喜欢

转载自blog.csdn.net/weixin_34224941/article/details/91986970