replace $(basename $0) with ${0##*/}