Skip to content

Instantly share code, notes, and snippets.

@bitkevin
Created July 23, 2013 09:17
Show Gist options
  • Save bitkevin/6061098 to your computer and use it in GitHub Desktop.
Save bitkevin/6061098 to your computer and use it in GitHub Desktop.
#! /bin/bash
#
# @see <http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in>
#
DIR=$(cd $(dirname "$0"); pwd)
echo $DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment