Grep lets you specify more than one pattern using multiple -e options. Then a line matches if any of the patterns match. Effectively each -e means 'or'.

It would be useful to have -and and -not options a la find(1), so

% grep -e hello -and -e there

to match lines containing both words. This simple example could be done with two grep processes in a pipeline, but it's certainly faster to grep the file once, and once you start adding context:

% grep --context=10 -e hello -and -e there

it's not really possible to get the same search with two separate greps.

The -v flag negates the sense of matching but it applies globally. You cannot ask grep to print lines matching one pattern but not another. As far as I know, grep's regular expressions don't have a negation operator so this would be an increase in grep's power. And handy together with -and, for example

% grep --context=10 -e '\*\*\*' -and -not -e 'modification time'

as a way to search your build logs for make errors which aren't the common 'modification time in the future'.