i want to create a new db of sqlite using A SHELL SCRIPT on an ubuntu10.10 OS....Any ideas??
I tried 'create.sh' file with following code...
#!/bin/bash
sqlite ex3.db
create table t1(f1 integer primary key,f2 text)
than run a ./create.sh from termminal but it leads me to sqlite> prompt...I dont see created DB ex3 anywhere..
Please help ...
One more way to accomplish this can be using SQL_ENTRY_TAG_N
#!/bin/bash
sqlite3 mydatabase <<SQL_ENTRY_TAG_1
SELECT * FROM sqlite_master;
SQL_ENTRY_TAG_1
see snippet for details
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With