shell脚本系列:如何获取脚本当前路径

BASE_DIR=$(cd -P $(dirname $0);pwd)
原文地址:https://www.cnblogs.com/iuskye/p/shell-pwd.html