#!/usr/bin/env python

import os, sys

for x in sys.argv[1:]:
    base, ext = os.path.splitext(x)
    #if os.path.exists('%s.csv'%base): continue
    s = "time sed 's/,$//' %s | head -n -1 | tail -n +2 | grep -v '\\\\u0000' > %s.csv"%(x, base)
    print(s)
    os.system(s)

@@ -100,50 +100,184 @@
    #
-if os.path.exists('%25s.csv'%25base): continue
+ The grep -v '%5C%5C%5C%5Cu0000' skips any json record with null bytes.  These are not valid/meaningful%0A    # for postgres, and happen in a very small handful of non-important records.
 %0A   

comment about why strip null bytes