console usage

Wednesday, 2 January 2019 · 5 messages
CG
Christian Grünin reply to thufir, 2 Jan 2019, 18:012 Jan 2019 17:07 #
Quoted text · thufir · 2 lines
> > RUN fetch.note.text.xq > Resource "/home/thufir/fetch.note.text.xq" not found.
Is the script located at this path? If not, you will have to change to this directory and start BaseX from there, or you will need to specify the full path.
T
thufir2 Jan 2019 18:01 #
How can I run this script? thufir@dur:~/basex$ thufir@dur:~/basex$ basex [warning] /usr/bin/basex: Unable to locate /usr/share/java/jing.jar in /usr/share/java BaseX 9.0.1 [Standalone] Try 'help' to get more information.
Quoted text · 2 lines
> > RUN fetch.note.text.xq
Resource "/home/thufir/fetch.note.text.xq" not found.
Quoted text · 2 lines
> > exit
Have fun. thufir@dur:~/basex$ thufir@dur:~/basex$ cat fetch.note.text.xq
fetch:xml("https://www.w3schools.com/xml/note.xml", map { 'chop': true() })
thufir@dur:~/basex$ The script seems to work fine from the GUI. thanks, Thufir
T
thufirin reply to Christian Grün, 2 Jan 2019, 17:072 Jan 2019 18:35 #
Quoted text · Christian Grün · 8 lines
On 2019-01-02 8:07 a.m., Christian Grün wrote: >> > RUN fetch.note.text.xq >> Resource "/home/thufir/fetch.note.text.xq" not found. > > Is the script located at this path? If not, you will have to change to > this directory and start BaseX from there, or you will need to specify > the full path. >
Yes, the script is there: thufir@dur:~/basex$ thufir@dur:~/basex$ cat fetch.note.text.xq
fetch:xml("https://www.w3schools.com/xml/note.xml", map { 'chop': true() })
thufir@dur:~/basex$ thufir@dur:~/basex$ ls -al fetch.note.text.xq -rw-r--r-- 1 thufir thufir 79 Jan 2 07:54 fetch.note.text.xq thufir@dur:~/basex$ thufir@dur:~/basex$ pwd /home/thufir/basex thufir@dur:~/basex$ Yet my attempts to execute from the console give an error. Thanks for confirming that the error, as it appears, is that the file cannot be found. Makes no sense to me. The script itself works from the GUI: https://stackoverflow.com/questions/54009208/ thanks, Thufir ps: I missed your earlier reply but have fixed my gmail filters.
T
thufirin reply to thufir, 2 Jan 2019, 18:012 Jan 2019 18:36 #
Quoted text · thufir · 2 lines
On 2019-01-02 8:01 a.m., thufir wrote: > Resource "/home/thufir/fetch.note.text.xq" not found.
Ohhhh My pwd is /home/thufir/basex which is where the script is..
T
thufirin reply to Christian Grün, 2 Jan 2019, 17:072 Jan 2019 18:38 #
Quoted text · Christian Grün · 8 lines
On 2019-01-02 8:07 a.m., Christian Grün wrote: >> > RUN fetch.note.text.xq >> Resource "/home/thufir/fetch.note.text.xq" not found. > > Is the script located at this path? If not, you will have to change to > this directory and start BaseX from there, or you will need to specify > the full path. >
You were spot on: thufir@dur:~/basex$ thufir@dur:~/basex$ basex [warning] /usr/bin/basex: Unable to locate /usr/share/java/jing.jar in /usr/share/java BaseX 9.0.1 [Standalone] Try 'help' to get more information.
Quoted text · Christian Grün · 2 lines
> > RUN fetch.note.text.xq
<note>
   <to>Tove</to>
   <from>Jani</from>
   <heading>Reminder</heading>
   <body>Don't forget me this weekend!</body>
</note>
Query "fetch.note.text.xq" executed in 1433.71 ms.
Quoted text · Christian Grün · 2 lines
> > exit
Enjoy life. thufir@dur:~/basex$ Thanks. And, enjoy life :)

⚡Generated with XQuery