Comment Comment by mhio The portablest solution I have found is: rundir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)") parent mhio 2 years ago