Created
December 4, 2023 15:34
-
-
Save herdianf/2c0164b83e38958d6cb9a9bd69d6fde9 to your computer and use it in GitHub Desktop.
Bash Relative to Source
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
#!/bin/bash | |
BASE=$(dirname $(realpath $0))/.. | |
echo $BASE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment