Also called: shebang, #!/bin/bash, set -e, .sh
In plain English
The first line (the shebang) says which program runs it. set -euo pipefail makes the script stop at the first error instead of carrying on blindly.
Example
The deploy script pulls the code, runs the migrations and clears the cache in one go.
In code
#!/usr/bin/env bash
set -euo pipefail
cd /home/u/site
git pull --ff-only
php artisan migrate --force
php artisan config:cache
Make it runnable with chmod +x deploy.sh, run it with ./deploy.sh.
Learn more
- The Bash GuideGreg's Bash wiki (opens in a new tab)
- Shell ScriptsGNU manual (opens in a new tab)
- ShellCheck (finds bugs in shell scripts)shellcheck.net (opens in a new tab)
Related terms
Added 2026-11-30 · Last reviewed 2026-11-30