Skip to content

Instantly share code, notes, and snippets.

@jwliechty
Last active December 25, 2015 14:39
Show Gist options
  • Save jwliechty/6992798 to your computer and use it in GitHub Desktop.
Save jwliechty/6992798 to your computer and use it in GitHub Desktop.
bash: Determine script directory
SCRIPT_DIR="$(readlink -f $(dirname $0))"
#or if must be supported on MAC
SCRIPT_DIR="$(cd "$(dirname "$0")"; pwd)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment