This should work in Bash:
MONO_PREFIX="${BASH_SOURCE[0]%/*}/subdir"
This should work in ksh:
MONO_PREFIX="${.sh.file%/*}/subdir"
And this is for zsh:
MONO_PREFIX="${funcsourcetrace[1]%/*}/subdir"
They will point to a directory called "subdir" under the directory in which the file is located.
source
share