aboutsummaryrefslogtreecommitdiff
path: root/db/test/find
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-06-28 23:59:50 +0200
committerlonkaars <loek@pipeframe.xyz>2023-06-28 23:59:50 +0200
commit67dbb6421976254658c5e38045513129dd18187a (patch)
tree288b599d1097b26bdbcad3b6749b38e133017cf2 /db/test/find
initial public commit
Diffstat (limited to 'db/test/find')
-rwxr-xr-xdb/test/find20
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"
+