On Thu, Jun 24, 2010 at 10:36:20AM -0400, Pavel Ivanov scratched on the wall: > > I was asking whether it is possible to use Shebang with sqlite script. > > If it is possible, would you please show me how to modify the > > following script to do so? > > If you don't mind one error message then you can do it like this: > > > cat test.sql > #!/usr/bin/sqlite3 -init
This works, but you must give the database file on the command line (or use an anonymous database). You might also want to add -batch. As best I can figure, the style the OP asked about (where the database file is part of the script) can't be done without a wrapper. This is still pretty useful, however. > Otherwise it's impossible to it because '#' is not a comment-starting > symbol in sqlite command line utility. I wonder if it would be worth creating a -initcli or something that simply ignored the first line of input. It could also imply -batch. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users