Last active
March 20, 2019 07:48
-
-
Save yyoshiki41/8dfe9807e55ce9ef2c2621bfedd76ca9 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
#!/bin/bash | |
output="./output.txt" | |
db="db_name" | |
user="root" | |
tables=$(mysql -uroot ${db} -e "SHOW TABLES;") | |
for table in ${tables} | |
do | |
if [ "${table}" == "Tables_in_dev_foo" ]; then | |
continue | |
fi | |
mysqlshow -u${user} ${db} "${table//_/\_}" >> "${output}" | |
echo "" >> "${output}" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
output