Created
August 12, 2013 19:32
-
-
Save edsu/6214277 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# pass this script a filename of ntriples data and get back a | |
# little report about the types of resources in the rdf, e.g. | |
# | |
# ed@curry:~/$ rdfsum oreily_catalog.nt | |
# 6803 <http://purl.org/goodrelations/v1#TypeAndQuantityNode> | |
# 5861 <http://purl.org/goodrelations/v1#Offering> | |
# 4564 <http://purl.org/goodrelations/v1#UnitPriceSpecification> | |
# 4065 <http://vocab.org/frbr/core#Manifestation> | |
# 2100 <http://vocab.org/frbr/core#Expression> | |
# 2023 <http://xmlns.com/foaf/0.1/Person> | |
# | |
grep 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type' $1 \ | |
| cut -f 3 -d " " \ | |
| sort \ | |
| uniq -c \ | |
| sort -rn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment