type dbscript.sql | sqlite3 test.db3 > dbscript.log 2>&1


And order is important....you need to redirect to file first and then redirect 
stderr to stdout as above.





Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems

________________________________
From: [email protected] [[email protected]] on 
behalf of Gert Van Assche [[email protected]]
Sent: Tuesday, February 14, 2012 3:09 PM
To: sqlite-users
Subject: EXT :[sqlite] sqlite3 windows command line: writing the sql errors to 
a file (and not to the screen)

All,

I have an sql script in an dbscript.sql file. To execute this script on a
windows command line I use:

               type dbscript.sql | sqlite3 test.db3

I have put this line in a batch file: dbscript.cmd
and I just execute this on the command line. (or via a Windows shortcut on
my desktop)

This works fine, but I would like to redirect the echo to a file, so that I
can capture the errors that might occur when dbscript.sql is executed.

Does anyone have an idea how to do this?


thanks

Gert
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to