Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function resetdb()
- {
- mysqlhost="asdf
- mysqluser="asdf"
- mysqlpasswd="asdf"
- mysqldb=( "asdf" "asdf")
- for db in ${mysqldb[@]}; do
- mysqlshow -u$mysqluser -p$mysqlpasswd -h$mysqlhost $db | sed -e "/\+/d" -e "s/[\ |\|]//g" -e "/^Tables*/d" -e "/^Database:*/d" | awk '{ print "DROP TABLE " $0 ";" ; }' | mysql -v -u$mysqluser -p$mysqldb -h$mysqlhost $db
- mysql -u$mysqluser -p$mysqlpasswd -h$mysqlhost $mysqldb < ../../../database/$db.sql
- mysql -u$mysqluser -p$mysqlpasswd -h$mysqlhost $mysqldb < ../../../database/demo.sql
- done
- }
- ./update.sh: line 34: syntax error near unexpected token `|'
- ./update.sh: line 34: ` mysqlshow -u$mysqluser -p$mysqlpasswd -h$mysqlhost $db | sed -e "/\+/d" -e "s/[\ |\|]//g" -e "/^Tables*/d" -e "/^Database:*/d" | awk '{ print "DROP TABLE " $0 ";" ; }' | mysql -v -u$mysqluser -p$mysqldb -h$mysqlhost $db'
- ./update.sh: line 35: ../../../database/.sql: No such file or directory
- mysql: option '-h' requires an argument
- ./update.sh: line 37: syntax error near unexpected token `done'
- ./update.sh: line 37: ` done'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement