Acclaimed Contributor Acclaimed Contributor
Re: not getting these variable values ${0##*/} and ${0%/*}

Basically these are the shell builtin replacements for dirname(1) and basename(1), operating on $0:

export DIR=$(dirname $0)

export NAME=$(basename $0)