Hi Bryan (cc @ basex-talk),
thanks for the confirmation. Yes, certain combinations of command-line arguments along with "-o" caused a buggy behavior. As usual, I've updated the latest snapshot containing the fix [1].
By the way, please note that all arguments will be evaluated from left to right in BaseX. This way, you can use a single BaseX call to write your results to several files, as e.g. shown here:
basex -ofile1.txt -q1 -ofile2.txt -c"xquery 1 to 10"
While this behavior may seem surprising at first glance, it has proven to be very helpful in our everyday's use. I tried to make this a little bit more explicit in our documentation [2].
Hope this helps, Christian
[1] http://files.basex.org/releases/latest/ [2] http://docs.basex.org/wiki/Startup_Options
basex-talk@mailman.uni-konstanz.de