Capstone: shipping Bash scripts that teams trust in CI and on servers. Combine lessons into habits—readable, tested, portable where promised.
Script checklist
- Shebang
#!/usr/bin/env bash(or sh if POSIX-only) set -euo pipefailand quote variables- Meaningful exit codes and stderr messages
- No secrets in repo—use CI secret stores
- Document required env vars and tools in README
- Test on clean CI runner, not only your laptop
Operations habits
# Log with timestamps
log() { echo "$(date -Iseconds) $*"; }
log "deploy started"
# Idempotent mkdir
mkdir -p /var/app/releasesLogs go to stdout/stderr for collectors—structure helps on-call engineers.
Where to go next
Deepen Git hooks and CI, explore server topics when available, and keep Python/Go services for business logic. This Bash track gave you the terminal glue—use it to automate safely, not to replace proper application code.
Track summary: 36 read-focused lessons—copy commands locally, master quoting and exit codes, compose GNU tools, script with set -euo pipefail, and integrate with Git/CI. No in-browser runner by design; your machine is the lab.
Important interview questions and answers
- Q: Minimum safety flags?
A: Oftenset -euo pipefailplus quoting and traps for temp files. - Q: When not Bash?
A: Complex APIs, heavy data science, or large apps—use a full language and keep Bash as glue.
Self-check
- List three items from the production script checklist.
- What track should you study next for version control integration?
Tip: Capstone: strict mode, quoted vars, tested CI, secrets outside Git. Next: deepen Git and server topics.
Interview prep
- Production safety trio?
Often set -euo pipefail plus quoting and logging.
- When not Bash?
Complex apps and APIs belong in full languages; Bash stays glue.