Skip to content

Instantly share code, notes, and snippets.

@d33tah
Created July 4, 2017 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d33tah/bee8d72bb5f7fb25513bf457eb22d07a to your computer and use it in GitHub Desktop.
Save d33tah/bee8d72bb5f7fb25513bf457eb22d07a to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import csv
import sys
r = csv.reader(sys.stdin)
max_file = 0
l = []
for line in r:
for i in range(max_file, len(line) + 1):
print("appending: %d" % i)
l.append(open(str(i), 'w'))
max_file = len(line) + 1
for i, col in enumerate(line):
l[i].write('%s\n' % col)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment