diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/doctype | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/doctype b/bin/doctype new file mode 100755 index 0000000..a10441f --- /dev/null +++ b/bin/doctype @@ -0,0 +1,14 @@ +#!/bin/sh +######################################################################## +# Script to print the document type, without needing the XML document +# to validate. Get the document type from the first argument to the +# <!DOCTYPE> element, which should be either "book" or "article". +# +# Use it like this: +# doctype file.xml +# +# If you know the XML file WILL VALIDATE, you may use the "doctype.xsl" +# script instead. If not, use this one +######################################################################## +egrep '^[[:space:]]*<!DOCTYPE' $* | +awk '{print $2 "info"}' |