Grep in Color
If you would like to make it easier to visually spot what you are looking for when using “grep”, try out the “–color” flag. This option highlights any matches in the output of your search, giving you an upper hand when trying to visually scan through complicated or cumbersome sequences.
For example, if you were looking for any IP address in your /etc/hosts.deny file that has the number “209″ in it, issue the following command:
$ grep --color 209 /etc/hosts.deny
Here is the comparison of the same output, with and without the color option.

As you can see, one might find it very easy to miss the fact that there are some IP addresses that have multiple octets with the value of 209. The color flag really comes in handy.
on December 28th, 2007 at 3:46 am
I recommend this:
alias grep=’grep –colour=auto’
(for bash, that is) - This way, grep autodetects if its output is going to a terminal and then turns color on. If it’s inside a pipe (where the colors would wreak havoc), it doesn’t. Pretty much like ls’s –color=auto option.
on December 28th, 2007 at 9:33 am
Ahh… I like this approach. Thanks for the input!