Skip to content

Instantly share code, notes, and snippets.

@sullust
Created August 15, 2012 00:43
Show Gist options
  • Save sullust/3354284 to your computer and use it in GitHub Desktop.
Save sullust/3354284 to your computer and use it in GitHub Desktop.
bash determine base directory of script
#!/bin/bash
BASEDIR=$(dirname $0)
echo $BASEDIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment