source: gs2-extensions/apache-jena/trunk/src/src3/gs-triplestore-file-query3@ 37271

Last change on this file since 37271 was 37271, checked in by davidb, 16 months ago

Progression towards the Fuseki server being run as a war file within Greenstone3's tomcat/webapps area

  • Property svn:executable set to *
File size: 551 bytes
Line 
1#!/bin/bash
2
3if [ $# -eq 0 ] ; then
4 echo "Usage: $0 file-query.sparql"
5 exit 1
6fi
7
8input_sparql_query_file=$1
9
10output_json_queryresult_file=${input_sparql_query_file%.*}.json
11
12sparql_query=`cat "$input_sparql_query_file"`
13
14port=${FUSEKI3_PORT:-8383}
15
16
17# The following line helps with runing a she-bang line of:
18# '#!/usr/bin/env ruby'
19# when the current script has been run from Perl under Cygwin
20#
21export PATH=/usr/bin:$PATH
22
23s-query --service http://localhost:$port/fuseki3/greenstone/query \
24 "$sparql_query" > "$output_json_queryresult_file"
Note: See TracBrowser for help on using the repository browser.