I have a simple make file and I want to highlite the word or line that contains "error:" to make it easier to see.
I am SSH via Putty to the linux machine which may cause a problem but currently I have tried to grep with a pipe but it doesn't highlight anything:
grep -E --color 'error|$' | make
How Can I highlite the line or word error in Console output? And could I make it into an Alias so I wouldn't have to grep pipe each time?
Best Answer
in grep there are 3 color options available to you:
Try specifying =always
From grep man page:
Lastly, you can specify the color parameter in a grep-specific environment variable. Then, you don't have to enter it in the command line.