Created
January 19, 2015 11:10
-
-
Save nfarring/c335fb004bf1720494c3 to your computer and use it in GitHub Desktop.
Bash wrapper around sqlite3 to run SQL commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Create the file "database.sqlite3". | |
# | |
# Reference: http://ss64.com/bash/syntax.html | |
which sqlite3 &> /dev/null | |
if [ $? -eq 1 ] | |
then | |
echo "sqlite3 not found" | |
exit 1 | |
fi | |
sqlite3 database.sqlite3 <create_database.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment