Skip to content

Instantly share code, notes, and snippets.

@varunagrawal
Forked from elentok/script_dir.sh
Created March 28, 2020 20:38
Show Gist options
  • Save varunagrawal/39a9811f707d7ba35644911d1552bc55 to your computer and use it in GitHub Desktop.
Save varunagrawal/39a9811f707d7ba35644911d1552bc55 to your computer and use it in GitHub Desktop.
Current script directory (works in bash and zsh)
SCRIPT_DIR=`dirname ${BASH_SOURCE[0]-$0}`
SCRIPT_DIR=`cd $SCRIPT_DIR && pwd`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment