seebi / rdf.sh

A multi-tool shell script for doing Semantic Web jobs on the command line.
GNU General Public License v3.0
120 stars 9 forks source link

Fixes @prefix counting (in case of 0) & adds new cmd 'nssort' & minor things #23

Open hoijui opened 1 month ago

seebi commented 1 month ago

Hi @elevont --- running your new command results in an error - can you fix this?

∴ rdf nssort
/Users/seebi/.local/bin/rdf: line 1048: prefixfile: unbound variable
hoijui commented 1 month ago

thank you @seebi ! should be fixed now. (I before only tested the commands in the shell directly, instead of within the script, sorry :/ )

seebi commented 1 month ago

@hoijui Given this file

@prefix : <https://sebastian.tramp.name/>.
@prefix foaf: <http://xmlns.com/foaf/0.1/>.

: a foaf:Person .

@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix owl: <http://www.w3.org/2002/07/owl#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.

I get this error:

∴ rdf nssort index.ttl
head: illegal line count -- -1

Any idea?

hoijui commented 1 month ago

Thanks for the testing! :-) Apparently I was using head in a way that works on Linux but not on Mac. It should now be fixed.