Skip to content

Instantly share code, notes, and snippets.

@nicerobot
Last active December 15, 2015 05:18
Show Gist options
  • Save nicerobot/5207637 to your computer and use it in GitHub Desktop.
Save nicerobot/5207637 to your computer and use it in GitHub Desktop.
csv2tsv in python
#!/bin/bash
csv2tsv() {
local tsv=$(dirname ${1})/$(basename ${1} .csv).tsv
python -c "import csv; csv.writer(file('${tsv}', 'w+'), delimiter='\t').writerows(csv.reader(open('${1}')))"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment