diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-06-28 23:59:50 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-06-28 23:59:50 +0200 |
commit | 67dbb6421976254658c5e38045513129dd18187a (patch) | |
tree | 288b599d1097b26bdbcad3b6749b38e133017cf2 /db/test |
initial public commit
Diffstat (limited to 'db/test')
-rwxr-xr-x | db/test/find | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/db/test/find b/db/test/find new file mode 100755 index 0000000..d22d711 --- /dev/null +++ b/db/test/find @@ -0,0 +1,20 @@ +#!/bin/sh + +TERM="$1" +USER="root" + +DICT_DB="../dict.db" +USER_DB="../user.db" +FIND_SQL="../find.sql" + +cd "$(dirname "$0")" + +sqlite3 \ + -markdown \ + -cmd ".timer ON" \ + -cmd ".param set :term '$TERM'" \ + -cmd ".param set :user '$USER'" \ + -cmd "attach '$DICT_DB' as dict" \ + -cmd "attach '$USER_DB' as user" \ + < "$FIND_SQL" + |