Changing the color of grep searches

cat << EOF | curl -X PUT -d @- uberleet.org

Found this gem on the internet, I didn’t know egrep supported this.

You can change greps highlight color to blue, by presetting a variable called GREP_COLORS with your desired ANSI color code.

You can change the 04;32 to any ANSI color code supported by your terminal.

GREP_COLORS='mt=04;32' egrep --color=always 'regexp_search_string'
EOF

Leave a Reply

Your email address will not be published. Required fields are marked *