Multi-Colour grep highlighting

A really simple post, but something pretty cool I found recently was multi-colour grep highlighting for piped searches:

grep 'exp1' filename --color=always | GREP_COLORS="mt=01;34" grep --color=always 'exp2'


The output will look like:



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.