How can I get the source directory of a Bash script from within the script itself? - Stack Overflow

PHOTO EMBED

Tue Aug 03 2021 04:10:33 GMT+0000 (Coordinated Universal Time)

Saved by @mdcx #sh

source "$( dirname "$( which "$0" )" )/lib/B"
content_copyCOPY

https://stackoverflow.com/questions/59895/how-can-i-get-the-source-directory-of-a-bash-script-from-within-the-script-itsel?noredirect