Created
November 21, 2018 12:01
-
-
Save AmmarCodes/87c63d78810b2ed53688f4d7680f1bfd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USERNAME= | |
PASSWORD= | |
DBNAME= | |
QUERY_FILE_NAME= | |
mysql -u $USERNAME -D $DBNAME -p$PASSWORD -B < $QUERY_FILE_NAME | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > $QUERY_FILE_NAME.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment