grep only show match code example
Example 1: grep not match
Just filter your output with:
grep -v "excluded_pattern"
Example to get all not txt files in current directory.
ls | grep -v .txt
Example 2: grep only third match
#Combine grep and tail for grepping until second match and filtering
#last with tail command
grep -m2 "two" in-file.txt | tail -n1