```bash path=$(readlink -f "${BASH_SOURCE:-$0}") # ディレクトリ DIR_PATH=$(dirname $path) ``` ## 参考 - [Get the absolute path of a script in Bash](https://linuxhint.com/absolute-path-script-bash/)