Skip to content

Instantly share code, notes, and snippets.

@mslepko
Created November 15, 2023 17:10
Show Gist options
  • Save mslepko/288971e8f0d25da41c847cc403f2e441 to your computer and use it in GitHub Desktop.
Save mslepko/288971e8f0d25da41c847cc403f2e441 to your computer and use it in GitHub Desktop.
Imports all .sql files in your current direcotry
#!/bin/bash
##
# Imports all .sql files in your current direcotry
##
for i in *.sql
do
echo "Importing: $i"
mysql your_db_name < $i
wait
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment