Created
May 2, 2020 06:10
-
-
Save snown/a949c1c5c9e69014d97699aca525177a to your computer and use it in GitHub Desktop.
Find the path to the bash script file currently being executed
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
get_script_path () { | |
printf '%s' "$(realpath "${BASH_SOURCE[0]}")" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment