In this short post i will show you an easy way to grep something and highlight the output in a color.
The only thing you have to do is to put the option “–color” after your grep command.
And thats it.
<somecommand> |grep --color
Now you can change the color whenever you use grep, you always get a colored output. To archive that use this command :
You now also can change the color of your grep output. You only have to set the GREP_COLOR environment variable different value.For further reading i recommend the MAN page: https://www.gnu.org/software/grep/manual/grep.html