I have a text file with many lines like -
The quick brown fox jumps over the lazy dog
The quick brown fox did not jumps over the lazy dog
The quick brown fox may jumps over the lazy dog
The quick brown fox may not jumps over the lazy dog
anything can happen
nothing can happen
I want to get the count of occurrences in lines where both 'fox' and 'jumps' comes.
Tried grep -ci "$word1|word2' $file
but this is not working