Remove repeated letter words

Hi,
I have this text file with these words and I need help with removing words with repeated letter from these lines.

      1 ama
      5 bib
     29 bob
      2 bub
      5 civic
      2 dad
     10 deed
      1 denned
    335 did
      1 eeee
      1 eeeee
      2 eke
      8 ere
      4 eve
    116 eye
      1 gig
      2 hah
      1 huuh
      3 III
      1 kraark
     12 level
      1 lil
      6 maam
      2 madam
      1 mem
      1 minim
     13 non
      8 noon
     11 nun
      1 pap
      5 peep
      1 pip
      2 poop
      9 pop
      2 pup
      1 rever
      1 sas
     10 sees
      1 ses
      1 solos
      1 tattarrattat
      1 tot
      1 tut
      1 txt
      2 wow

remove the words like 'eeee' and 'III'

i know there is a way of using sed to remove specific lines, I think it's along the lines of 's/'eeee/' but i want a way to remove any repeated letters using one command.

any help would be great thank you.

What operating system and shell are you using?

Is this a homework assignment? We have seen a request similar to this recently, except that request was looking for words that only contained a single character instead of a repeated letter.

Please more clearly define exactly what you are trying to do. Every word in your sample text file has at least one letter that appears more than once. Are you saying that you want to remove every line from your text file?

Does ama also count as a word with repeating letters? After all, the 'a' occurs twice, but not in succession.

Welcome crepe6,

Please always include the output from uname -a wrapped in CODE tags so we know which OS and version you are using.

Please confirm the context of this issue, i.e. is it homework/course assignment so we know how to answer.

If you are looking for 3 or more of the same character in succession (given that double-letters are valid in many words) would you be okay with some Perl?

An expression something like /(.)\1\1/ might help I think, i.e. match any character followed by the same twice. You might want to refine that to letters only to avoid matching on white-space or numbers if they are in your file too.

Of course, this doesn't match kraark , tattarrattat , wibblewobblesnoozydunno or even Hh_ee_ll_ll_oo_WW_oo_rr_ll_dd if they are in (or added to) the list, so should they be in or out?

Is there a dictionary list you can match against if you want real words only?

You need to be clearer to your criteria, after answering if this is homework or if not giving the context so we can most suitably be able to progress this.

Kind regards,
Robin

awk '{l=$0; if (length($2)!=gsub(substr($2,1,1), "", $2)) print l}' infile