Skip to content

Instantly share code, notes, and snippets.

@pca2
Created March 1, 2017 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pca2/4e98d271b6b221e95c19a61edf1912db to your computer and use it in GitHub Desktop.
Save pca2/4e98d271b6b221e95c19a61edf1912db to your computer and use it in GitHub Desktop.
bash containing directory
#return the containing directory of file
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment