Put both commands (the pragma and the read) into a file (e.g. foo.txt) and then do:
sqlite3 newDatabase.sqlite '.read foo.txt' -T On Tue, Dec 2, 2008 at 8:48 PM, Jerry Krinock <[EMAIL PROTECTED]> wrote: > I need a command-line script running on Mac OS 10.5 to rebuild sqlite > 3 database files with a page_size of 4096 bytes. > > The first line of my script dumps the database to a text file, then > next line should read it create a new one. Since the default page > size is 1024 bytes, documentation says that I need to change it with a > PRAGMA before creating the database. So I do this: > > sqlite3 newDatabase.sqlite 'PRAGMA page_size=4096; .read dump.txt' > > Result: > > SQL error: near ".": syntax error > > If I eliminate either the PRAGMA or the .read statement, there is no > error. But I need them both. What can I do? > > Thank you, > > Jerry Krinock > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users