Thanks Simon that does it It does strike me though that there would be some value in making the in app '.' (dot) commands and the command line options consistent especially as there has been an increase in the number of both as new versions have come about. From a programming perspective I suspect it would also be more maintainable as well
So you get: .header [ON|OFF] and -[no]header But you only get .echo [ON|OFF] and -echo so there is no -noecho option There is a .read but no -read There is .mode csv and a -csv but wouldn't it be better to have a -mode csv (and by implication a -mode tcl where there is not -tcl) Don't get me wrong this is not a major whinge - I love sqlite and appreciate the effort of the developers put into maintaining it but as it grows having a consistent single command set for .commands and options would be a good thing David M Walker Data Management & Warehousing 0118 321 5930 dav...@datamgmt.com http://www.datamgmt.com > Date: Thu, 8 Dec 2011 17:26:55 +0000 > From: Simon Davies <simon.james.dav...@gmail.com> > To: General Discussion of SQLite Database <sqlite-users@sqlite.org> > Subject: Re: [sqlite] Command line option equivalent for .read > Message-ID: > <CANG6AhQjNs08OM93iaE0xNONbTRPJsRRzhKkSsdy+N3b=fp...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > 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