Hi. I have a script in which I process data from standard input like this:
VOCAB_WITH_NEW_VOCAB_NOTE="$(echo "$VOCAB" | "${BASEX}" -i - -q $" copy $c := . modify ...
etc. etc.
The script has been working fine.
However, due to a defect in an earlier line in the script, during one test run, the value of $VOCAB was (incorrectly) an empty string.
But in this case, I got a quite unexpected result from the above invocation of BaseX.
I can easily repeat the same phenomenon out of the script's context thus:
$ echo '' | basex -i - -q '.' <vocabulary xmlns="http://vocabs.ands.org.au/registry/schema/2017/01/vocabulary" ... etc. etc.
In this case, rather than processing the empty string provided as standard input, BaseX fetched data from one of my databases.
Can I/how do I force the option "-i -" to mean "read data from standard input, and _only_ from standard input, even if that is empty"?
-- Richard Walker Australian Research Data Commons (ARDC) (formerly, Australian National Data Service, ANDS) 101 Liversidge Street The Australian National University Acton ACT 2601, Australia E: Richard.Walker@ardc.edu.au T: +61 2 6125 0584 W: ardc.edu.au W: www.ands.org.au