0
I want to print 5 lines of context around each line that matches "foo" but not "foobar".
I can do the match easily enough via <output> | awk '/foo/ && !/foobar/'
but I can't figure out how to show context like <output> | grep -C 5 'foo'
would do.
I'd settle for figuring out the above compound conditional in a grep
one-liner as well.