Skip to content

Instantly share code, notes, and snippets.

@felixrabe
Created November 19, 2012 13:49
Show Gist options
  • Save felixrabe/4110745 to your computer and use it in GitHub Desktop.
Save felixrabe/4110745 to your computer and use it in GitHub Desktop.
abspath
function abspath() {
cd -P -- "$(dirname -- "$1")" &&
echo "$(pwd -P)/$(basename -- "$1")"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment