Created
November 29, 2018 14:47
-
-
Save sean9999/b4e92a320912d14d78fa4166ca58c6b5 to your computer and use it in GitHub Desktop.
bash:: get path of current file
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 | |
## @from: https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment