I am using Virtuoso engine. For entering a query into Virtuoso engine, the following needs to be done:
The virtuoso engine starts and gives the command prompt:
[myMachine]$ ./isql 1111
Connected to OpenLink Virtuoso
Driver: 07.20.3213 OpenLink Virtuoso ODBC Driver
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
SQL>
The query "sparql select ?a?b?c where{graph ?g{?a ?b ?c} };"
is entered by the user as following:
[myMachine]$ ./isql 1111
Connected to OpenLink Virtuoso
Driver: 07.20.3213 OpenLink Virtuoso ODBC Driver
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
SQL> sparql select ?a?b?c where{graph ?g{?a ?b ?c} };
Now in order to automate the process of inserting queries into Virtuoso I wrote the user entered value:"sparql select ?a?b?c where{graph ?g{?a ?b ?c} };"
into a text file (mytext.txt
) and used the following command:
[myMachine]$ ./isql 1111 < mytext.txt
However still the Virtuoso prompt appears as the following -- asking me to enter the query string:
[myMachine]$ ./isql 1111 < mytext.txt
Connected to OpenLink Virtuoso
Driver: 07.20.3213 OpenLink Virtuoso ODBC Driver
OpenLink Interactive SQL (Virtuoso), version 0.9849b.
Type HELP; for help and EXIT; to exit.
SQL>
Is there some way in linux or c++: by which using shell script (for linux) or system calls for c++ I can enter my query string into Virtuoso. I need to run 10,000 queries therefore manually entering 10,000 queries in Virtuoso is a pain.