#!/bin/bash if [ $# -ne 1 ] ; then echo "Usage: $0 dataset-name" >&2 exit 1 fi dataset_name=$1 # strip off leading '/' if present, as not needed in the URL formed below dataset_name=${dataset_name#/} port=${FUSEKI3_PORT:-8383} ## The following line helps with runing a she-bang line of: ## '#!/usr/bin/env ruby' ## when the current script has been run from Perl under Cygwin ## #export PATH=/usr/bin:$PATH #wget -O - --method=GET "http://localhost:$port/fuseki3/$/datasets/${dataset_name}" 1>/dev/null # # Consider letting the JSON returned be output to screen?? # had_error=$(curl --silent -X GET "http://localhost:$port/fuseki3/\$/datasets/${dataset_name}" | egrep '^Not found: dataset' | wc -l) #get_status=$? #exit $get_status exit $had_error