獲取Shell腳本當前的目錄

https://qiushao.net/article/1489983836453?p=1&m=0python

 

SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE[0]}); pwd)
cd $SCRIPT_DIR
echo "current path:"
pwd
相關文章
相關標籤/搜索