Skip to content

Instantly share code, notes, and snippets.

@asmedrano
Created February 4, 2013 18:49
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 asmedrano/4708675 to your computer and use it in GitHub Desktop.
Save asmedrano/4708675 to your computer and use it in GitHub Desktop.
Get the location of the bash script you are running. Great for making alias..ssss
SCRIPTPATH=$(cd "$(dirname "$0")"; pwd)
echo SCRIPTPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment