#!/bin/sh text=$(curl -s -d @$1 -H "Content-Type: application/xhtml+xml; charset=UTF-8" 'http://validator.nu/?out=text&preset=http://s.validator.nu/xhtml5-aria-rdf-svg-mathml.rnc+http://s.validator.nu/html5/assertions.sch+http://c.validator.nu/all/') if [ -n "$(echo "$text"|grep "The document validates according to the specified schema(s).")" ]; then exit 0 else echo "=== $1 ===" echo "$text" exit 0 #1 fi