From f1c658425b34a5d4f9c9e4554300fa9b217f3545 Mon Sep 17 00:00:00 2001 From: "Eugeniy E. Mikhailov" Date: Mon, 26 Sep 2022 23:50:08 -0400 Subject: simplified regenBlackboardDB --- regenBlackboardDB.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'regenBlackboardDB.sh') diff --git a/regenBlackboardDB.sh b/regenBlackboardDB.sh index 44f5655..4231683 100755 --- a/regenBlackboardDB.sh +++ b/regenBlackboardDB.sh @@ -1,7 +1,10 @@ #!/bin/bash -rm -f 2021_Blackboard.db -printf '.mode csv\n.import 2021_Blackboard.csv export_table' | \ - sqlite3 2021_Blackboard.db +CSVFILE="$1" +bbfile=Blackboard.db +rm -f "$bbfile" + +printf ".mode csv\n.import \"$CSVFILE\" export_table" | \ + sqlite3 "$bbfile" -- cgit v1.2.3