Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ $# -lt 2 ]
- then
- echo "Usage: `basename $0` database wildcardpattern"
- echo "Eg: `basename $0` mydatabase App_%"
- exit 1
- fi
- database=$1
- pattern=$2
- mysqldump $database `mysql -ND $database -e "SHOW TABLES LIKE '$pattern'" | awk '{printf $1" "}'`
Add Comment
Please, Sign In to add comment