Created
October 25, 2012 12:43
-
-
Save thinkjson/3952355 to your computer and use it in GitHub Desktop.
Check for duplicate lines in a group of files
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
| #!/usr/bin/python | |
| # Invocation: | |
| # cat [files] | python checksum_per_line.py | sort | uniq -c | sort -nr | awk '{ if ($1 > 1) print $0 }' | |
| import sys | |
| import hashlib | |
| for line in sys.stdin: | |
| print hashlib.md5(line).hexdigest() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment