Skip to content

Instantly share code, notes, and snippets.

@harryjubb
Forked from netj/csv2tsv.py
Created September 21, 2017 13:25
Show Gist options
  • Save harryjubb/31e091b8a08c0683f791fcd76cd048f3 to your computer and use it in GitHub Desktop.
Save harryjubb/31e091b8a08c0683f791fcd76cd048f3 to your computer and use it in GitHub Desktop.
CSV to TSV python one-liner
#!/usr/bin/env python
import sys,csv
for row in csv.reader(sys.stdin):
print "\t".join(row)
python -c "`printf '%s\n' 'import sys,csv' 'for row in csv.reader(sys.stdin):' ' print "\t".join(row)'`"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment