Colorize text matching a regex through a pipe?

David Kramer david-8uUts6sDVDvs2Lz0fTdYFQ at public.gmane.org
Wed Jan 19 00:28:51 EST 2011


On 01/19/2011 12:21 AM, Derek Martin wrote:
> On Tue, Jan 18, 2011 at 10:24:03PM -0500, David Kramer wrote:
>> Thanks.  I played with this, and with colortail.  I didn't really like
>> either solution in the end.  [e]grep only allows one color and one
>> pattern, and colortail doesn't actually work as a filter (the author
>> "has a patch for that").
> 
> Upgrade fileutils.  Newer versions of grep are much more configurable.

I did some searching and was unable to find anything saying some version
of grep can colorize matches to different regexes with different colors.
 Can you elaborate?

Since this has to work in Cygwin, this is not an option for this
particular case, but I'm curious.

Thanks.




More information about the Discuss mailing list