SQLite Forum

a probable bug in .output handler
Login
I'm not sure it's "fixed" in the usual sense, but it works with the initializer. (I tested .output, .once, and .excel with combinations of options and named FILE.)

For grins, I tested with and without bOnce initialized to zero.  It seems to work the same way, regardless.  I would have to run it under a debugger to see why, but it seems not worth the bother.  (The behavior is undefined, after all.)

While testing I noticed something contrary to expectation.  The help for .once suggests that, if a FILE is named, that's were the re-routed output will go. But with the -x option given, a tempfile is created regardless.  (I discovered this because I forgot what names I had used, and went to see what got written. Only then did I see that when Excel opens, the title bar shows one of the bizarre filenames that gets generated for tempfiles.) I suppose a separate report on that would be appropriate.