Which option of the uniq command allows you to specify the number of fields to ignore in its comparisons?
uniq -f
-f, --skip-fields=N avoid comparing the first N fields
| ###### Spider Websites with Wget 20 Practical Examples | |
| # original, from 2019: | |
| # https://www.labnol.org/software/wget-command-examples/28750/ | |
| ###### Spider Websites with Wget 20 Practical Examples | |
| # wget is extremely powerful, but like with most other command line programs, | |
| # the plethora of options it supports can be intimidating to new users. | |
| # Thus what we have here are a collection of wget commands that you can use | |
| # to accomplish common tasks from downloading single files to mirroring entire websites. | |
| # It will help if you can read through the wget manual but for the busy souls, |
| # show all graphs accessiblefrom a SPARQL endpoint | |
| # no "base" prefix is needed | |
| # | |
| # | |
| # from anzograph tutorial. | |
| # query works in anzograph running on localhost, | |
| # but not on dbpedia.org, wikidata and other public endpoints | |
| # on dbpedia running on localhost:8890/sparql this returns 54261 rows | |
| SELECT DISTINCT ?graph | |
| WHERE { |
| #!/usr/bin/env bash | |
| ##### Query Wikidata Entities from bash - alternative | |
| # returns only very basic graphs NOT via the SPARQL endpoint | |
| # knb 2020 | |
| WDURL='https://www.wikidata.org/w/api.php' | |
| WDQS='action=wbgetentities&format=json&sites=enwiki' | |
| WGE="$WDURL?$WDQS" | |
| echo $WGE >&2 | |
| #curl -s: means --silent | |
| WDITEM=Solar_System |
| # more RDF prefixes, also very common | |
| base <http://localhost:8180/sparql/> # anzograph | |
| PREFIX : <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
| PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | |
| PREFIX skos: <http://www.w3.org/2004/02/skos/core#> | |
| PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
| PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
| PREFIX owl: <http://www.w3.org/2002/07/owl#> | |
| PREFIX hint: <http://www.bigdata.com/queryHints#> |
| <!-- saved here as a gist, for reference in case it gets changed or is taken offline --> | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schema.igsn.org/description/1.0" targetNamespace="http://schema.igsn.org/description/1.0" elementFormDefault="qualified" xml:lang="EN" version="1.0"> | |
| <xs:include schemaLocation="include/accessType.xsd"/> | |
| <xs:include schemaLocation="include/collectionType.xsd"/> | |
| <xs:include schemaLocation="include/contributorType.xsd"/> | |
| <xs:include schemaLocation="include/featureType.xsd"/> | |
| <xs:include schemaLocation="include/geometryType.xsd"/> | |
| <xs:include schemaLocation="include/identifierType.xsd"/> |
| # https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/query_optimization | |
| # if previous statement is rangeSafe , add: | |
| hint:Prior hint:rangeSafe true. | |
| # This tells the optimizer that ?dateOfBirth doesn’t mix | |
| # dates, strings, integers or other data types, | |
| # which simplifies the range comparison. | |
| # This is almost always true on Wikidata, | |
| # so the main reason not to use this optimizer hint all the time is | |
| # that it’s a bit inconvenient. |
| # from someone's Twitter timeline, Dec 2022 | |
| # Wikidata: search for emigrants during Nazi era | |
| SELECT DISTINCT ?category ?person ?description WHERE { | |
| ?category a skos:Concept . | |
| ?category skos:prefLabel ?label . | |
| FILTER (CONTAINS(?label, "Zeit des Nationalsozialismus")) | |
| ?person dct:subject ?category. | |
| ?person rdfs:comment ?description . | |
| FILTER (LANG(?description) = 'de') . } |
| # for more prefixes | |
| # (wikidata, common) | |
| # see also https://gist.github.com/knbknb/081ee7af40a01a0a365d0df5f49acd7c | |
| # | |
| # "Notable works" of a writer | |
| # | |
| PREFIX : <http://dbpedia.org/resource/> | |
| PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
| PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | |
| PREFIX dbo: <http://dbpedia.org/ontology/> |
| # Writing Frictionless R Package Wrappers — Building A Basic R Package | |
| # https://rud.is/b/2020/01/03/writing-frictionless-r-package-wrappers-building-a-basic-r-package/#fnref-12609-2 | |
| # in any RStudio R Console session | |
| devtools::create("~/packages/THE-PACKAGE-NAME") | |
| # in the newly created package RStudio R Console session: | |
| usethis::use_mit_license() # need a LICENSE file | |
| usethis::use_roxygen_md() # use {roxygen2} for documentation and configuration | |
| usethis::use_package_doc() # setup a package-level manual page |
Which option of the uniq command allows you to specify the number of fields to ignore in its comparisons?
uniq -f
-f, --skip-fields=N avoid comparing the first N fields