Glossary · Phase 7 · Software engineering
Shell script
A text file of shell commands run top to bottom, usually ending in .sh.
Try it now
Scripts read top to bottom: how to run, how to behave, what to remember, what to do.
Learn it properly
Shell scripts that fail safely · Turn commands into scripts with variables, set -euo pipefail and clear exit codes, and know when to switch to Python. About 25 minutes.
Other terms from the same lesson
- exit code: The number a program hands back when it ends: 0 for success, anything else for a kind of failure.
- shebang: A script's first line, such as #!/usr/bin/env bash, naming the program that runs it.
Never trained an AI?
Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account.