#!/bin/bash # Check with Nu validator (https://github.com/validator/validator) if installed which vnu >/dev/null && vnu site/*.html site/tests/*.html || exit 1 for file in site/*.html site/tests/*.html; do # /dev/null is to force file names to be printed (grep -H is a GNU extension) if grep -n '\s$' /dev/null $file; then echo "$file has trailing white space." exit 1 fi done