Hi Joseph, As far as I understand the documentation, BaseX `proc:system` does not use a shell interpreter by default. `<` or also the pipe `|` are features offered by your shell, not the operating system. Instead of passing a single parameter, pass the command as parameter to `/usr/bin/env sh -c`, which will make BaseX run a shell that interpretes I/O indirection: proc:system('/usr/bin/env', ('sh', '-c', 'opennlp postagger model.bin < file.txt')) This might be a reasonable thing to provide as a built-in function, I'm also not sure whether one can connect some kind of stream/strings to STDIN, STDOUT and STDERR. Regards from Lake Constance, Germany, Jens Am 09.11.2015 um 10:19 schrieb Christian Grün:
Any suggestions?
Any example? ;) Christian
Thanks.
Joseph
Inizio messaggio inoltrato:
Da: meumapple <meumapple@gmail.com> Data: 06 novembre 2015 20:52:08 CET A: BaseX <basex-talk@mailman.uni-konstanz.de> Oggetto: Bash command
Hi all,
I am using proc:system for a bash command but I cannot run it. It looks like opennlp postagger model.bin < file.txt. I suspect that the problem is the less-than sign, which is converted into < Is there any way to keep the less-than sign and pass it to the bash properly? Thanks.
Joseph
-- Jens Erat Universität Konstanz Kommunikations-, Infomations-, Medienzentrum (KIM) Abteilung Basisdienste D-78457 Konstanz Mail: jens.erat@uni-konstanz.de