Skip to content

Instantly share code, notes, and snippets.

@spikeheap
Created November 3, 2015 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spikeheap/53889b79b19033d4ade9 to your computer and use it in GitHub Desktop.
Save spikeheap/53889b79b19033d4ade9 to your computer and use it in GitHub Desktop.
export XMLLINT_FILE=xmllint_20151103_1930.log
xmllint --schema docs/NHIC_ICU_v8.3.2-Final.xsd --noout docs/output/NIHRHIC_CC_8.3.2_Oxford\ 03112015.xml 2>&1 | grep -v "The attribute 'm' is required but missing." > $XMLLINT_FILE
# get an overview of the failure counts
cut -d':' -f3 $XMLLINT_FILE | sort | uniq -c | sort
# lookup a particular error (_0085 in this case):
cat $XMLLINT_FILE | grep _0085 | cut -d: -f7 | sort -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment