Skip to content

Instantly share code, notes, and snippets.

@goldenboy
Forked from sr3d/gist:134895
Created February 16, 2012 14:25

Revisions

  1. @sr3d sr3d created this gist Jun 23, 2009.
    1 change: 1 addition & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    mysql -h HOST -u USERNAME --password=PASSWORD DATABASE -B -e "SELECT id,email,first_name,last_name,state,zip_code FROM users" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > filename.csv