If you’re running grep on a large file with multipled results, highlighting your results would really easy on your eyes.
Here’s how;
Export the “GREP_OPTIONS” environment variable to include “–color=auto”. Run the export command below.
export GREP_OPTIONS='--color=auto'
Once you’ve executed the command, run a simple grep to see the highlights in action.
Red is the default highlight color. I’ll cover setting custom colors in a future post.