Determining the location of your script in Bash
binaryphile.com