Colorize text matching a regex through a pipe?

Richard Pieri richard.pieri-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Dec 29 12:07:58 EST 2010


On Dec 29, 2010, at 11:52 AM, David Kramer wrote:
> 
> Is there a linux tool that can work as a pipe (read stdin, write to stdout) and colorize any text
> matching an regex?  If not, I'll have to write one.  Not that hard, but I would hate to reinvent
> it.

Text has no color of it's own.  It is, after all, just bits.  There may be codes within a text stream that tell the display or renderer to set color properties, but that's a little different.  What, exactly, is your display or rendering mechanism, because HTML is going to be notably different from, say, a Tektronix terminal.

--Rich P.




More information about the Discuss mailing list