Reliable Bash script starting point
Start a shell script with strict error handling and a useful exit message.
#!/usr/bin/env bash
set -euo pipefail
trap 'printf "Script failed on line %s\\n" "$LINENO" >&2' ERR
printf 'Starting task...\\n'
# Add your commands here.