开发者

Unix command to ignore lines that begins with X

I'm currently using a compiler that constantly returns warnings, I don't want to see the warnings. I've noticed that all warnings begin with the string "Note :", so I figured it's possible to filte开发者_如何学Cr out these lines.

I compile with

jrc *.jr

Is there a unix command that alters the output it gives to not print out the lines that begin with "Note :"?


grep -v "^Note:"

Also, you may want to redirect stderr to stdout:

command 2>&1 | grep -v "^Note:"


Another way would be to use sed.

sed '/^Note:/d'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜