check: find . -name "*.xml" -exec xmllint -valid -loaddtd -noout {} \; 2> errors if [ -s errors ] ; \ then \ echo ; \ echo "**************************************************" ; \ echo "There are validity errors. Check the file \"errors\"" ; \ echo "**************************************************" ; \ else \ rm errors ; \ echo ; \ echo "****************************" ; \ echo "All the documents are valid." ; \ echo "****************************" ; \ fi