Skip to content

Instantly share code, notes, and snippets.

@pca2
Created March 1, 2017 17:43
Show Gist options
  • Select an option

  • Save pca2/4e98d271b6b221e95c19a61edf1912db to your computer and use it in GitHub Desktop.

Select an option

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