I want to search all files in a directory for a Keyword and color it, like:
grep -n "keyword1" * --color
Now I want to highlight all occurrences of keyword2
and keyword3
in an other color.
I managed
grep -n "keyword1 * |egrep --color "keyword2|keyword3|$'
this will color both last keywords but in the same color.
but I fail to set several different colors to work with a coloring from the first grep-statement. I don't know how to set the constant GREP_COLORS
correctly