Last active
April 12, 2024 01:41
-
-
Save zainengineer/f307cd8921371c20d6d813a0d44e85da to your computer and use it in GitHub Desktop.
bash script path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
script_path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P ) | |
root_path=$(dirname $(dirname $(dirname "$script_path"))); | |
#for simple any level using .. | |
script_path=$( cd "$(dirname "${BASH_SOURCE}")" ; pwd -P ) | |
dirname=$(realpath "$script_path/..") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment