Hiding lines of DOS output starting with a certain word
I have a java program that I am running inside of a command prompt shell which generates a lot of output. Many of the lines start with the word "Prepared" or "prepared", and are not really necessary for me to see when running the program- th开发者_StackOverflow社区ey actually make it harder to see the data that I am interested in. Is there a way to hide any lines starting with these words while running the program?
Change your program to use log4j or something like it, and then control which levels of message are sent to the console.
you can pipe the output to:
FIND /V /I "string you want to omit"
This will remove all iterations of said string from your output.
myJavaApp | findstr /iv prepared
精彩评论