Created
January 9, 2015 00:49
-
-
Save terrycojones/ea104b0be50f25e6fa62 to your computer and use it in GitHub Desktop.
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/env python | |
import sys | |
from collections import defaultdict | |
seen = defaultdict(list) | |
for lineNumber, line in enumerate(sys.stdin): | |
if lineNumber: | |
fields = line.split('|') | |
key = '|'.join(fields[:2] + fields[3:]) | |
seen[key].append(line) | |
for lines in seen.itervalues(): | |
if len(lines) > 1: | |
for line in lines: | |
print line, | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment