Created
April 24, 2012 17:08
-
-
Save alfrekjv/2481566 to your computer and use it in GitHub Desktop.
Import many .sql files into mysql
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 | |
FILES=/home/alfrek/databases/*.sql | |
for f in $FILES | |
do | |
echo "Importing $f ..." | |
# take action on each file. $f store current file name | |
mysql -u root -p < $f | |
echo "Finished importing $f" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment