|No such thing as a small change|
Stupid console tricks (or color highlighted tail)by icius (Sexton)
|on Dec 20, 2002 at 17:33 UTC||Need Help??|
icius has asked for the
wisdom of the Perl Monks concerning the following question:
Hello wise ones,
I have a simple goal of being able to color highlight certain lines of output matched by a regex when using the tail -f command. For example:
If the word "ERROR" appears in the log line, color the whole line red on output
So I want this nice little command window merrily spewing out lines from logfiles and color highlighting certain lines with certain text.
I am also interested in any other tricks to make command line programs look cooler such as:
A rotating star using the characters \ | / - (seen on some unix install tools)
Progress bars (as seen on secure copy commands)
How is this kind of dynamic in place line output achieved?
I am on Windows XP Pro with ActivePerl 5.8