sqlite-things/script.sh

12 lines
309 B
Bash
Raw Permalink Normal View History

2022-07-15 20:16:25 +00:00
#!/bin/bash
if [[ $1 -eq "0" ]]; then
2022-07-15 20:21:21 +00:00
sqlite3 test.db ".read sql/create_db.sql"
2022-07-15 20:16:25 +00:00
elif [[ $1 -eq "1" ]]; then
2022-07-15 20:21:21 +00:00
sqlite3 test.db ".read sql/insert_data.sql"
elif [[ $1 -eq "2" ]]; then
sqlite3 test.db ".read sql/show_sg.sql"
2022-07-15 20:16:25 +00:00
elif [[ $1 -eq "9" ]]; then
2022-07-15 20:21:21 +00:00
sqlite3 test.db ".read sql/show_all.sql"
2022-07-15 20:16:25 +00:00
fi