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:

Selection_057

Advertisement

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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.