Skip to content

Instantly share code, notes, and snippets.

@ilkerde
Created March 23, 2011 21:18
Show Gist options
  • Save ilkerde/884012 to your computer and use it in GitHub Desktop.
Save ilkerde/884012 to your computer and use it in GitHub Desktop.
Canonical (absolute) path of a running BASH script
SCRIPT=$(realname -f $0)
SCRIPTPATH=`dirname $SCRIPT`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment