./ is a directory bash when trying to run scrip code example Example: run bash script in its directory #!/bin/bash cd "$(dirname "${BASH_SOURCE[0]}")"