tr "[:print:]" "[x*]" < FILE | egrep -vno '^(..+)\1+$'[H-CHAT] What's your top three shell tricks?
The thread explains what it does, and I would probably replace the .'s in the egrep pattern with x's; still very cute.
It can also provide a good example of when cs theory can occasionally be useful: Given the provided solution uses a gnu-extensions to regex(7), can this be done with a pure POSIX regular expression?
No comments:
Post a Comment