Skip to content

Instantly share code, notes, and snippets.

@aaronott
Created February 15, 2019 14:10
Show Gist options
  • Save aaronott/14d66d7a62dc84f5941174a55d4df71f to your computer and use it in GitHub Desktop.
Save aaronott/14d66d7a62dc84f5941174a55d4df71f to your computer and use it in GitHub Desktop.
parse logger++
#!/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