Created
July 7, 2012 04:49
-
-
Save narusemotoki/3064753 to your computer and use it in GitHub Desktop.
SQLite3のコマンドを直接実行します
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
#!/bin/sh | |
if [ 2 -ne $# ]; then | |
echo "引数にデータベース名 実行するSQL文を与えてください" 1>&2 | |
exit 1 | |
fi | |
sqlite3 $1<<EOF | |
.separator , | |
$2 | |
.exit | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment