Guest User

Untitled

a guest
Nov 20th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. output="./output.txt"
  4. db="db_name"
  5. user="root"
  6.  
  7. tables=$(mysql -uroot ${db} -e "SHOW TABLES;")
  8. for table in ${tables}
  9. do
  10. if [ "${table}" == "Tables_in_dev_1o1" ]; then
  11. continue
  12. fi
  13. mysqlshow -u${user} ${db} "${table//_/\_}" >> "${output}"
  14. echo "" >> "${output}"
  15. done
Add Comment
Please, Sign In to add comment