I'm trying to find the set of words (if any) that contain two consecutive e’s, and also contains two y’s. But so far I tried following commands ,
grep -e '[y&y].*[ee]' -e '[y&y].*[ee]' words2.txt grep -e 'y.y' -e 'ee' words2.txt grep -X '.*[y.y].*&.*[ee].*' words2.txt grep -X '.[*y.y].*&.[*ee].*' words2.txt
some of these commands gives either two y's or two consecutive e's, but don't give a word that contains both of these conditions. What should I do now?