/ Published in: Bash
Gets the absolute path of the script itself even when it's executing, not just a simple "pwd".
Expand |
Embed | Plain Text
abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")"
You need to login to post a comment.
