Created
February 15, 2019 14:10
-
-
Save aaronott/14d66d7a62dc84f5941174a55d4df71f to your computer and use it in GitHub Desktop.
parse logger++
This file contains 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 csv | |
import sys | |
if len(sys.argv) < 2 : | |
sys.exit('Usage: %s <csv file>' % sys.argv[0]) | |
with open(sys.argv[1], 'r') as csvfile: | |
reader = csv.reader(csvfile) | |
for row in reader: | |
## Interesting rows 3,5,4,8 | |
#print "%s%s,%s,%s,%s" % (row[3],row[5],row[12],row[4],row[8]) | |
print "%s%s,%s,%s,%s" % (row[3],row[5],row[6],row[4],row[8]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment