开发者

Unix command to ignore lines that begins with X

开发者 https://www.devze.com 2023-02-10 21:17 出处:网络
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 fi

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

精彩评论

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