Today I needed a simple way to colorize the output of my running tests using a UNIX utility.
I was unable to find a simple but configurable utility for this task, so I developed one myself in Perl.
The color matching expressions are defined in the file .coloraddrc of your home directory.
Here is the example of mine for the application I am testing at the moment:
"\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}" = cyan
"^\s*DEBUG" = yellow
"==> .*$" = green
"<== .*$" = pink
"ERROR( |:|=>).*$" = red
"WARNING( |:|=>).*$" = beige
So the first part are the regular expressions (perl syntax). The second part, after the equal, is the color to set the content of the matching.
The available color's keywords are: red, green, yellow, beige, blue, purple, magenta, pink, cyan, gray, white, normal and bell (for a bell in the output, might be usefull).
Feel free to drop comments to this small utility I have developed.
Bellow is a screenshot of the output of the utility:

And here you can download the utility:
coloradd-v0.2.tar.gz





