Skip to content

Instantly share code, notes, and snippets.

@adamwespiser
Last active September 1, 2015 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamwespiser/1ec9dc6bf2a11cc0001a to your computer and use it in GitHub Desktop.
Save adamwespiser/1ec9dc6bf2a11cc0001a to your computer and use it in GitHub Desktop.
SQL_Queries_For_Mere_Mortals.sh
#!/bin/bash
# http://www.informit.com/title/9780321992475
# non-modify ones
ls | grep -i structure | grep -v Modify | xargs -I{} echo mysql -u root --password='****' '<' \"{}\" | sh
ls | grep -i data | grep -v Modify | xargs -I{} echo mysql -u root --password='*****' '<' \"{}\" | sh
# maybe this will work if you just run the structure, then data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment