How do i do this:
mysql -u myuser -p mydb -e \"select f1,f2 from mytable\" > /tmp/mydata.txt
But I want to separate the fields with a c
You might also try the SELECT INTO OUTFILE command to produce your CSV file. Info here: http://dev.mysql.com/doc/refman/5.1/en/select.html