Hi Graydon,
If this is the contents of "count.xq"…
declare variable $file external; count($file => file:read-text() => string-to-codepoints())
…you can use the -b flag to bind a value to a variable:
basex -b file=abs-or-rel-path/to/input.txt count.xq
I’m not sure if that helps. Feel free to give us more information on your use case. A minimized test case would be very appreciated.
Best, Christian
On Mon, Jan 25, 2021 at 9:18 PM Graydon Saunders graydonish@gmail.com wrote:
Hello --
So I'm on a Linux box and my colleague is on a Windows system. We're both using a query that takes before and after versions of a file, converts each to a single string, and writes that back out as two additional files. (This exists to check if we still have all the words in the same order between before and after.)
There must be a sensible way to parameterize the file names so they can be relative to the query on both platforms/easily loaded from a file/something that isn't hand-editing a variable (external or not), but I can't think of it.
What's the sensible way to do this?
Thanks! Graydon