1
I'm trying to figure out how to list consecutive letters in grep. For example if I wanted to list all words with two consecutive a’s OR i’s OR u’s in one line how would I do this?
From my understanding the command would look something like egrep [a]{2} | egrep [i]{2} | egrep [u]{2}
But what if it's the case that the word has aa and ii or any other combination of the three letters consecutively by twos?
Grep is not egrep. Please be more specific in the title. – reinierpost – 2010-09-08T17:01:56.433
2Well it kind of is - they're the same program under the hood, but when invoked as
egrep
it just adds the-E
option. That does change the regular expression syntax a little but it doesn't make a substantial difference in the question. – David Z – 2010-09-08T17:17:27.793