Colour highlighting - grep search results

I always find it difficult scanning through hundreds of lines of search results trying to match the keyword you specified.

By default linux doesn't colour code grep search results, but there's an option to change this.

By saving some settings inside your .bash_profile (file that get's called upon your login, usually resides within /home/username/.bash_profile) the linux terminal will remember your settings.

# create red colour for grep search results
export GREP_OPTIONS='--color=auto' 

# or use a green highlight?
export GREP_COLOR='1;32'

comments powered by Disqus