获取shell脚本自身所在目录

Eave 2018.04.10

获取shell脚本自身所在目录

dir="$(cd "$(dirname "$0")" && pwd)"