1 2 3 4 5 6 7 8 9
#!/bin/sh # pkgclear -- remove files left by patch n=0 fs=$(ls *.~[2-9]~ *.~[2-9][0-9]~) rm $fs for f in $fs; do : $((n++)); done echo "${0##*/}: deleted $n files" 1>&2