Created
October 18, 2020 04:06
-
-
Save khalidx/733ab914adcd9080ae0d7f5e99b3a572 to your computer and use it in GitHub Desktop.
For cd'ing into the same directory as the script file, instead of running at cwd by default.
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
# https://stackoverflow.com/questions/3349105/how-to-set-current-working-directory-to-the-directory-of-the-script-in-bash | |
cd "${0%/*}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment