[sqlite] How initialize a database file from unix shell without landing in SQLite command prompt?

2015-03-14 Thread Mikael
I have a file DBDEFINITION.TXT that I want to use to initialize [execute on] the database DB.SQLITE. How do I do something like $ sqlite3 -exec DBDEFINITION.TXT DB.SQLITE $ ? All methods I tried end me up in the SQLite prompt, and that is what I don't want. Like, doing sqlite3 -init

[sqlite] How initialize a database file from unix shell without landing in SQLite command prompt?

2015-03-14 Thread R.Smith
On 2015-03-14 10:51 AM, Mikael wrote: > I have a file DBDEFINITION.TXT that I want to use to initialize [execute > on] the database DB.SQLITE. > > How do I do something like > > $ sqlite3 -exec DBDEFINITION.TXT DB.SQLITE > $ A piped file is always the answer - for anything really. If a piped

[sqlite] How initialize a database file from unix shell without landing in SQLite command prompt?

2015-03-14 Thread Neville Dastur
Just pipe the text file to sqlite3 # sqlite3 DB.SQLITE : >I have a file DBDEFINITION.TXT that I want to use to initialize [execute >on] the database DB.SQLITE. >How do I do something like >$ sqlite3 -exec DBDEFINITION.TXT DB.SQLITE >$ >? >All methods I tried end me up in the SQLite prompt, and