ooOoo <[EMAIL PROTECTED]> writes:

> Is there a way to force sqlite to quit when it reads
> commands from a file?
>
> Here is what I have in mind:
>
>   For a file junk.in:
>
>      begin transaction;
>      insert into students values(
>      6588,'Ezak','Dood','F2001');
>      commit;
>
>   I can run sqlite like this:
>
>      sqlite3 -init junk.in test.db
>
>   ... but sqlite is left running interactively.

I haven't yet played with the sqlite3 stuff, but with sqlite from 2.8.x, you
could do:

  cat junk.in | sqlite test.db

The EOF on sqlite's standard input when junk.in is exhausted causes sqlite to
exit.  You might give that a try.

Derrell

Reply via email to