I have a word list, such as:
word letter linux tagggs
I want to remove
tagggs from it (because they have two or more of the same letters in a row). Maybe this can be done using sed?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
You can use one of the regex tools that supports backreferences e.g.
sed '/\(.\)\1/d' file grep -v '\(.\)\1' file
[[:alpha:]] if you really want to restrict it to repeated letters rather than any repeated characters.