Skip to content

Tags

On this page

Bash Tips

Curating bash Tips

Get bash script parent dir absolute path

workspace="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/../" &> /dev/null && pwd )"

Get bash script dir path

workspace="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

Bash Dotenv

导出.env 文件到当前执行环境

set -o allexport; source .env; set +o allexport
Edit this page
Last updated on 11/9/2021