mydir=$(cd "$(dirname "$0")"; pwd) echo "dir: $mydir"