How can I set the current working directory to the directory of the script in Bash?

#!/bin/bash
cd "$(dirname "$0")"

Leave a Comment