I'm trying to use Grep with wc -l to print out the number of words in a text file that have 3 or more vowels in a row.
Right now, I'm inputting:
grep -i -E '<\.*[aeiou]{3}.*\>' file.txt | wc -l
but this is not returning the correct number of words, because on some lines there are multiple words that have 3 vowels in a row.
if file.txt contains this :
beautiful courteous
beautiful
courteous
my desired output would be 4, rather than 3, and currently I'm only able to get 3.
I've been looking online for a while for a solution but I just can't seem to figure it out. Can anyone assist?