#! /bin/bash set -e [ "$1" ] && cd $1 BASE_URL=`pwd -P | sed 's|/home/httpd/users/|http://riva.ucam.org/~|'` set +e shopt -s nullglob for x in *.html; do echo $BASE_URL/$x; nsgmls -s $BASE_URL/$x; done