shebang
Toby Inkster
mail at tobyinkster.co.uk
Wed Jun 9 17:43:45 CEST 2010
If RDF::TrineShortcuts is installed, then the following works:
#!/usr/local/bin/trapper -qo rdfxml
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
<#me> foaf:name "Bob" .
Save as a file, chmod +x then run it. Not sure why you'd want to.
Slightly more useful:
#!/usr/local/bin/toquet -ojson
SELECT *
WHERE { <http://dbpedia.org/resource/Cheese> ?p ?o . }
Save this as cheese.sparql, chmod +x and then run:
./cheese.sparql -E http://dbpedia.org/sparql
Or even:
curl -o cheese.html http://dbpedia.org/page/Cheese
./cheese.sparql -D cheese.html
But why waste time with curl?
./cheese.sparql -D http://dbpedia.org/page/Cheese
Hopefully newer versions of trapper and toquet will be able to exploit
the shebang line even better.
--
Toby A Inkster
<mailto:mail at tobyinkster.co.uk>
<http://tobyinkster.co.uk>
More information about the Dev
mailing list