Created
June 12, 2019 08:30
-
-
Save zfenj/af9627b22450c5080f8428ba341f5298 to your computer and use it in GitHub Desktop.
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
# Source: https://unix.stackexchange.com/a/115431 | |
#!/usr/bin/env zsh | |
# only file- / script name | |
echo ${0:a} | |
#!/usr/bin/env zsh | |
# file- / script name with path | |
echo ${0:a:h} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment