SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
bash: script_dir one liner
here’s the small one liner to get the current directory of a script executed
thanks to
in the name of god, the most beneficent, the most merciful
here’s the small one liner to get the current directory of a script executed
SCRIPT_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd)
thanks to