I have checked this topic to find two words in a text file: How to combine two search words with "grep" (AND)
But now I'm trying to know if it's possible to check when they are consecutive in the file. For instance:
grep -ilZ "not" file.txt | xargs -0 grep -il "sure"
In file.txt I have "I am not sure".
How could I do?
Thank you so much.