Skip to content

Instantly share code, notes, and snippets.

@narusemotoki
Created July 7, 2012 04:49
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 narusemotoki/3064753 to your computer and use it in GitHub Desktop.
Save narusemotoki/3064753 to your computer and use it in GitHub Desktop.
SQLite3のコマンドを直接実行します
#!/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