Created
May 10, 2021 15:42
-
-
Save CodyKochmann/af67a9cd5baf6884be423485567dc933 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# by: Cody Kochmann | |
/t/u/1/tmp.1LQUz9KguH $ echo "CREATE TABLE test(col1 TEXT, col2 INTEGER);" | tee schema.sql | |
CREATE TABLE test(col1 TEXT, col2 INTEGER); | |
/t/u/1/tmp.1LQUz9KguH $ cat schema.sql | sqlite3 test.db | |
/t/u/1/tmp.1LQUz9KguH $ sqlite3 test.db '.tables' | |
test | |
/t/u/1/tmp.1LQUz9KguH $ printf "col1,col2\na,1\nb,2\n" | sqlite3 test.db ".import --csv /dev/stdin test" | |
/t/u/1/tmp.1LQUz9KguH $ sqlite3 test.db 'select * from test' | |
col1|col2 | |
a|1 | |
b|2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment