Created
November 5, 2017 02:56
-
-
Save togume/83b4bf40e1528742374bbce338270f34 to your computer and use it in GitHub Desktop.
Shell script to convert Access DB to SQL - Requires mdbtools
This file contains 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
#!/bin/bash | |
TABLES=$(mdb-tables -1 $1) | |
for t in $TABLES | |
do | |
echo "DROP TABLE IF EXISTS $t;" | |
done | |
mdb-schema $1 mysql | |
for t in $TABLES | |
do | |
mdb-export -D '%Y-%m-%d %H:%M:%S' -I mysql $1 $t | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jerryq27 your gist link is dead