cd hi/html for f in *.html ; do hs=${f%.html}.hs [ -r ../../$hs ] || rm $f done