Created
September 24, 2011 18:19
-
-
Save jlapier/1239663 to your computer and use it in GitHub Desktop.
grep for double words in text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I use this to find double words in a text file | |
# for example, "Give it to the kid." gets typoed as "Give it the the kid." | |
# this regex will find "the the" and help me track down those double word typos | |
egrep '(\b\w+)\s\1\b' *.txt --color -n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment