This question already has an answer here:
- Match two words that is on the same line 4 answers
I want to look for lines with "word1 ... word2" where '...' could be any different characters. So far I have used two greps for the same like this:
grep "$word1" $filename | grep "$word2"
Is there a faster way to do this by suppose something like this:
grep "$word1*$word2" $filename
where maybe * could be some special character which can be any other character(s)?