Skip to content

Instantly share code, notes, and snippets.

@shubhamagarwal92
Created March 10, 2019 22:34
Show Gist options
  • Save shubhamagarwal92/4c2f10da3fcd69d0b0fb299a1e82d2b1 to your computer and use it in GitHub Desktop.
Save shubhamagarwal92/4c2f10da3fcd69d0b0fb299a1e82d2b1 to your computer and use it in GitHub Desktop.
Go the parent directory of the current bash file
export CURRENT_DIR=${PWD}
export PARENT_DIR="$(dirname "$CURRENT_DIR")"
echo "You are in: "
echo $CURRENT_DIR
echo "Parent directory is: "
echo $PARENT_DIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment