Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unix command to ignore lines that begins with X

Tags:

unix

sed

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 filter 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 :"?

like image 873
Tarrasch Avatar asked Feb 17 '11 13:02

Tarrasch


1 Answers

grep -v "^Note:"

Also, you may want to redirect stderr to stdout:

command 2>&1 | grep -v "^Note:"
like image 144
Erik Avatar answered Oct 17 '22 19:10

Erik