diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-09-26 23:50:08 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2022-09-26 23:50:08 -0400 |
commit | f1c658425b34a5d4f9c9e4554300fa9b217f3545 (patch) | |
tree | 4ca5e394a9340f28afe3108de22b9fbe56e8df61 | |
parent | 659a053d4297b74c3daf748f0a608b5b7e583dd2 (diff) | |
download | GradeBook-f1c658425b34a5d4f9c9e4554300fa9b217f3545.tar.gz GradeBook-f1c658425b34a5d4f9c9e4554300fa9b217f3545.zip |
simplified regenBlackboardDB
-rwxr-xr-x | regenBlackboardDB.sh | 9 |
1 files changed, 6 insertions, 3 deletions
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" |