Published in: Bash
URL: http://www.cpanelconfig.com/tips/mysql-execute-query-from-console-and-export-to-csv/
mysql –database=database –execute=”select a from b where a>1;” | sed ’s/\t/”,”/g;s/^/”/;s/$/”/;s/\n//g’ > filename.csv
You need to login to post a comment.
