I was wondering if there is a program in the common unix toolset such as grep that instead of filtering the lines that contain a string, simply outputs the same input but highlighting or coloring the selected string.
I was thinking in doing it by myself (should be simple enough), but maybe it already exists as a unix command.
I'm planning in using it to monitor logs, so I would do something like this:
tail -f logfile.log | highlight "error"
Usually when I'm monitoring logs I need to find a particular string but I also need to know what is written before and after the string, so filtering sometimes is not enough.
Does something like that exist?