On 8 December 2011 17:05, David Walker <dav...@datamgmt.com> wrote:
> Hi,
>
> Having played around with a shell script that calls SQLite I have noticed 
> that I can something like
>
>        .separator STRING      at the SQLite prompt
>        .mode line
>
> or I can do
>
>        sqlite3 -separator STRING at the command line
>        sqlite3 - line
>
> This is both useful and consistent
> However if I want to execute a file I can only do
>
>        .read FILENAME     at the SQLite prompt
>
> or I can do either of
>
>        cat FILENAME | sqlite3
> or
>        sqlite3 <FILENAME
>
> Is there an equivalent '-read' for the command line and if not might there be 
> in the future?
> The '-init' option does not seem to perform the same function although it 
> does read the file

Does
    sqlite3 theDb ".read FILENAME"
do what you want?

>
> It is inconsistent and when writing wrapper shell/perl scripts on occasions 
> makes scripts a little more complex
> e.g. try doing it with a Perl IO::CaptureOutput(qxx) call where you don't 
> have access to piped stdin :-(
>
> rgds
> davidw
>

Regards,
Simon
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to