grep matches, grep -v does the inverse. If you need to “match A but not B” you usually use pipes:
grep "${PATT}" file | grep -v "${NOTPATT}"
grep matches, grep -v does the inverse. If you need to “match A but not B” you usually use pipes:
grep "${PATT}" file | grep -v "${NOTPATT}"