Skip to content

Instantly share code, notes, and snippets.

@resourcemode
Last active August 18, 2016 02:20
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 resourcemode/a682dfeda0692d706a71537f2d980f91 to your computer and use it in GitHub Desktop.
Save resourcemode/a682dfeda0692d706a71537f2d980f91 to your computer and use it in GitHub Desktop.
import mysql
#!/bin/bash
FILES=/Users/IT/dumps/LocalDB/*
for f in $FILES
do
echo "Processing $f file..."
# take action on each file. $f store current file name
mysql -uDBUSER -hDBHOST --pDBPASSWORD DBNAME < $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment