How to get the path to the current script in bash

Published 03 September 2015 under bash, shell, path, software

It's sometimes useful to be able to get the absolute path to the current script in bash:

SCRIPT_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

Comments

blog comments powered by Disqus