cd in shell script doesn't change directory code example Example: bash change to script directory cd "$(dirname "${BASH_SOURCE[0]}")"