I need to be able to do this via command line in one step:
lab-1:/etc/scripts# sqlite3 test.db SQLite version 18.104.22.168 2015-05-20 18:17:19 Enter ".help" for usage hints. sqlite> .mode csv ; sqlite> .import /tmp/test.csv users sqlite> select * from users; John,Doe,au,0,"",1,5555,91647fs59222,audio sqlite> .quit
I've tried the following:
lab-1:/etc/scripts# sqlite3 test.db ".mode csv ; .import /tmp/deleteme.csv users"
lab-1:/etc/scripts# sqlite3 test.db ".mode csv .import /tmp/deleteme.csv users"
I don't get errors but I also don't end up with any data in the users table.
Any tips would be appreciated.