I often use
tail -f | grep someregex on log files. I have grep liased to
grep ---color=auto so my matches are highlighted. If I want to see my matches in the context of the whole stream, how would I go about that? Essentially, I want to use tail + grep as a highlighter.
To see your matches in context, use the
If I understand well, it is what you are looking for:
It will print the lines where the "regex" matches.