Tim Yohn wrote:
>
> Michael,
>
> On Fri, 2003-07-11 at 11:56, Michael Weber wrote:
> > $line =~ s/reject/$red.reject.$normal/gi ;
> > $line =~ s/ from /$yellow from $normal/gi ;
> > $line =~ s/status/$blue status $normal/gi ;
>
> The following does work however I don't kn
Michael,
On Fri, 2003-07-11 at 11:56, Michael Weber wrote:
> $line =~ s/reject/$red.reject.$normal/gi ;
> $line =~ s/ from /$yellow from $normal/gi ;
> $line =~ s/status/$blue status $normal/gi ;
The following does work however I don't know exactly how valid it is
(which i
First, thanx to Tim and Bob. It is working as I would like. Now I have
a substitution question.
If $line is "delay=12, status=sent (fw-3.alliednational.com)" how do I
make a substitution like this...
#!/usr/bin/perl -w
use strict;
my $line;
my $red="\033[0;31m";
my $yellow="\033[0;33m";
my $b
Michael Weber wrote:
> I am trying to write a simple filter that will mark in different
> colors certain words as they pass through.
>
> For example, if I do a tail -f /var/log/messages I want words I am
> looking for to be in red and other words in yellow with the rest of
> the text unchanged. (
On Thu, 2003-07-10 at 17:30, Michael Weber wrote:
> Here's the basic frame of code I'm using:
>
> #!/usr/bin/perl -w
>
> use strict;
>
> my $line;
>
> while(1) {
> $line = ;
> # Highlighting code goes here...
> print $line;
> }
>
I would suggest using the following