阅读背景:

尝试使用grep,sed等时如何处理颜色代码

来源:互联网 

I'm trying to use sed to process some output of a command that is generating colored lines (it's git diff, but I don't think that's important). I'm trying to match a '+' sign at the beginning of the line but this is being confounded by the color code, which precedes the '+'. Is there a simple way to deal this this issue, or do I need to use some complicated regular expression to match the color code.I'm trying to use sed to process some output of




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: