Skip to content

Instantly share code, notes, and snippets.

@Serpens
Created November 16, 2015 14:15
Show Gist options
  • Save Serpens/32a5a402230501148ab3 to your computer and use it in GitHub Desktop.
Save Serpens/32a5a402230501148ab3 to your computer and use it in GitHub Desktop.
Bash - get script directory.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # cd & pwd to get full name (not ".") in all cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment