#!/bin/sh for s in $1/* do if [ -d "$s" ] then $0 $s fi done for s in $1/*~ do if [ -e "$s" ] then echo "rm $s" rm "$s" fi done