SysIII/usr/src/cmd/basename.sh

a=`expr ${1-.}// : '\(.*[^/]\)//*$'`
expr //$a : ".*/\(.*\)$2"