Skip to content

Instantly share code, notes, and snippets.

@netj
Created August 16, 2010 14:38
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save netj/527042 to your computer and use it in GitHub Desktop.
Save netj/527042 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