views:

28

answers:

1

I have a build process which runs from a batch file. It produces a large volume of text. Sometimes it prints the word "Error" or "Warning" followed by a message. The errors and warnings are getting lost among a sea of text.

Can I highlight those words in a different color, maybe in a dos window, or a cygwin shell window, possibly by piping them through some string manipulation program before posting them to the screen?

Thanks.

+1  A: 

Probably the best way is to pipe the output to a shell script and then colorize using ANSI codes. Unfortunately ANSI support on Windows (at least in XP) is pretty lacking and you have to use some workarounds to get ANSI to show up in a DOS window; it will work under cygwin, but that might cause problems with your batch file.

Ken Liu