Hi all,

I have created a repository e.g., owlimtest

Would you please tell me whether there is any way to execute a query (in a file e.g., query1.sparql) by using a single command with console.sh

Something like this: ./console.sh -s http://localhost:8080/openrdf-sesame/repositories/owlimtest < query1.sparql

(As I know http://localhost:8080/openrdf-sesame/repositories/owlimtest is the SPARQL endpoint for owlimtest, but the above command doesn't work. Usually, I have to connect to serverURL by running ./console.sh -s http://localhost:8080/openrdf-sesame . Then open the repository and type the query for executing).

Thank you very much.

asked 28 Jul '13, 11:09

minhducit's gravatar image

accept rate: 0%

cat query1.sparql | awk 'BEGIN {qtext="";} {qtext = qtext" "$0; }END {print"open owlimtest.nsparql " qtext "."}' | ./bin/console.sh -s http://localhost:8080/openrdf-sesame


answered 29 Jul '13, 10:30

Zdravko%20Tashev's gravatar image

Zdravko Tashev ♦
accept rate: 50%

edited 29 Jul '13, 11:06

Thanks alot Zdravko. Minor typos owlimtest.nsparql ===> owlimtest.\nsparql

(30 Jul '13, 12:21) minhducit
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 28 Jul '13, 11:09

Seen: 3,017 times

Last updated: 11 Jul, 08:06

powered by BitNami OSQA