Open xvno opened 3 years ago
通常用在以该 .sh 文件所在文件夹为工作目录的某些操作中
# file_dir=`cd $(dirname $0) && pwd` file_path=$(dirname $0) file_dir=$(cd $file_path && pwd) # e.g. cat $file_dir/mysql.env
Refs