Skip to content

Instantly share code, notes, and snippets.

@wermarter
Created October 14, 2023 02:05
Show Gist options
  • Save wermarter/67fcbb191e2459ac5a2353e0fdb3ee36 to your computer and use it in GitHub Desktop.
Save wermarter/67fcbb191e2459ac5a2353e0fdb3ee36 to your computer and use it in GitHub Desktop.
find current dir and parent dir of running script
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
PARENT_DIR=$( dirname $SCRIPT_DIR )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment