分享一篇博客 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"详解 https://blog.csdn.net/davidhopper/article/details/78989369