Grep Invert match on multiple words echo "hello world" | grep -vE 'hello|foo' # echo "only bar" | grep -vE 'hello|foo' # only bar