Re: [basex-talk] proc:system

2019-11-13 Thread Christian Grün
Good to see, everything’s alright then. proc:system will only output a result if the command was executed successfully. Giuseppe G. A. Celano schrieb am Mi., 13. Nov. 2019, 19:27: > I would expect just some text, as with proc:system("ls") > > > Usage: > /usr/local/bin/tesseract --help |

Re: [basex-talk] proc:system

2019-11-13 Thread Giuseppe G. A. Celano
I would expect just some text, as with proc:system("ls") Usage: /usr/local/bin/tesseract --help | --help-extra | --version /usr/local/bin/tesseract --list-langs /usr/local/bin/tesseract imagename outputbase [options...] [configfile...] OCR options: -l LANG[+LANG]Specify

Re: [basex-talk] proc:system

2019-11-13 Thread Christian Grün
> Interestingly, proc:execute("/usr/local/bin/tesseract") works (I have BaseX > 9.2). How does the output look like? > proc:system("/usr/local/bin/tesseract") returns the following: If the code 1 is raised, it indicates that your command will be executed indeed, but it returns the exit code 1.

Re: [basex-talk] proc:system

2019-11-13 Thread Giuseppe G. A. Celano
Hi Christian, Interestingly, proc:execute("/usr/local/bin/tesseract") works (I have BaseX 9.2). proc:system("/usr/local/bin/tesseract") returns the following: > SET DEBUG true DEBUG: true > XQUERY proc:system("/usr/local/bin/tesseract") org.basex.query.QueryException: at

Re: [basex-talk] proc:system

2019-11-13 Thread Christian Grün
Hi Giuseppe, > When I try to run > proc:system("/usr/local/bin/tesseract") I get the error [proc:code0001] On my system, I get the (expected) error… [proc:error] Cannot run program "/usr/local/bin/tesseract": CreateProcess error=2, Das System kann die angegebene Datei nicht finden …so we may

[basex-talk] proc:system

2019-11-13 Thread Giuseppe G. A. Celano
Hi, When I try to run proc:system("/usr/local/bin/tesseract") I get the error [proc:code0001] Similarly: proc:system("tesseract") returns [proc:error] Cannot run program "tesseract": error=2, No such file or directory Similarly: proc:system("tesseract", (), map {"dir" :

Re: [basex-talk] proc:system and bash redirecting

2018-01-18 Thread Christian Grün
Hi Kristian, You may be glad to hear that we recently had a similar requirement. I have revised and extended the Process Module and uploaded a new snapshot [1,2]. Looking forward to your feedback, Christian [1] http://docs.basex.org/wiki/Process_Module#proc:system [2]

[basex-talk] proc:system and bash redirecting

2018-01-17 Thread Kristian Kankainen
Hello! I need to redirect the content of a file into a program using stdin. In my shell I would do like this (silly example): wc < somefile Is this possible to do with proc:system? Giving "<" as an argument to the command doesn't work: proc:system("wc", ("<", "somefile")) outputs

Re: [basex-talk] proc:system ?

2017-10-13 Thread jean-marc Mercier
Andy, Thank you for your answer. Indeed, the length of my parameters are now much more than the Windows limit. I guess that creating a temporary file, then passing the name of the file as parameters should solve the issue. Cheers, Jean-Marc 2017-10-13 10:42 GMT+02:00 Andy Bunce

Re: [basex-talk] proc:system ?

2017-10-13 Thread Andy Bunce
Hi Jean-Marc, I have hit this kind of issue before and it is not BaseX specific. The problem is Windows(tm) limits [1] This is compounded by the Java call from proc:system passing in a copy of the environment of the current process [2]. Mine has built up a large class path over time with my

[basex-talk] proc:system ?

2017-10-12 Thread jean-marc Mercier
Hello BaseX team, I am an extensive user of the proc:system BaseX command (and looking forward for proc:fork !). I am using this command with in-memory arguments, it means that my way of using it is : proc:system("my_exe", $my_arguments_for_exe) $my_arguments_for_exe is an xml node serialized