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)
or
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
Adam
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)
or
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
Adam
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Stupid console tricks (or color highlighted tail)
by Callum (Chaplain) on Dec 20, 2002 at 17:38 UTC | |
Stupid console tricks (progress bars)
by Mr. Muskrat (Canon) on Dec 20, 2002 at 18:11 UTC | |
Stupid console tricks (rotating star)
by Mr. Muskrat (Canon) on Dec 20, 2002 at 17:57 UTC | |
Re: Stupid console tricks (or color highlighted tail)
by rob_au (Abbot) on Dec 20, 2002 at 22:26 UTC | |
Re: Stupid console tricks (or color highlighted tail)
by John M. Dlugosz (Monsignor) on Dec 20, 2002 at 21:01 UTC | |
Re: Stupid console tricks (or color highlighted tail)
by tstock (Curate) on Dec 20, 2002 at 23:42 UTC |
Back to
Seekers of Perl Wisdom