Shell script

A text file of commands that runs from top to bottom, for jobs you repeat.

Also called: shebang, #!/bin/bash, set -e, .sh

Type
Term
Source
General
Language
Bash

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

Related terms

Added 2026-11-30 · Last reviewed 2026-11-30