Skip to content

Instantly share code, notes, and snippets.

@JoshuaEstes
Created October 4, 2013 19:13
Show Gist options
  • Save JoshuaEstes/6831131 to your computer and use it in GitHub Desktop.
Save JoshuaEstes/6831131 to your computer and use it in GitHub Desktop.
mysql export table into CSV file
mysql -u USERNAME -p DATABASE -e "select * from TABLE;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment