How can I change the color of build output in a shell window?
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?开发者_如何学C
Thanks.
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.
精彩评论