Determine bash script's location from bash script
Snippet
Instead of being asleep at 14:54 on 23 October 2016, kitt created this:
Sometimes, you need to know the current (full-path) directory of a bash script in order to launch another file relative to the bash script, instead of using global paths or the $PATH value.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Add new comment