grep only third match code example
Example: 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
#Combine grep and tail for grepping until second match and filtering
#last with tail command
grep -m2 "two" in-file.txt | tail -n1