mysql -h 127.0.0.1 -u user -p123456 -Bse "select name,age from user where age > 10;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > /tmp/user.csv

相关文章: