I have a file containing random codes. Each code has ten characters in it, and I am trying to grep codes in the file that have at least 2 occurrences of a character. I am doing this:
grep DD* [filename]
This finds codes with 2 occurrences of the character 'D', but it also shows codes that have just 1 occurrence of 'D'. How can I change my regular expression to only show codes with 2 occurrences?