.output /path/to/out/file
redirects output to the named file rather than displaying it in the console. .output
without filename ends the redirection, and the output is shown in the console again. sqlite> .output /tmp/schema.sql sqlite> .schema sqlite> .output