Bash
In short: The most widespread command-line shell on most Linux systems and macOS — both an interactive console and its own scripting language for automation.
In more detail: Bash scripts automate typical terminal tasks (moving files, chaining programs, build/deployment steps). Unlike full-fledged programming languages, Bash is primarily designed for orchestrating other programs, not for complex logic of its own.
In Depth
Origin and adoption
Bash (“Bourne Again SHell”, a pun on the original Unix shell sh by Stephen Bourne, which Bash replaced and extended) has been the default shell on most Linux distributions for decades (macOS switched to zsh by default in 2019, for licensing reasons — newer Bash versions are under the GPLv3, which Apple wanted to avoid for legal reasons — but Bash remains widespread and is usually also available on macOS). A simple Bash script that iterates over files:
#!/bin/bash
for file in *.txt; do
if [ -f "$file" ]; then
echo "Processing: $file"
mv "$file" "processed/$file"
fi
donePipes as a central tool
A central principle of the Unix philosophy that strongly shapes Bash scripts: chaining small, specialised programs together via pipes (|), instead of having one big program do everything — e.g. cat log.txt | grep "Error" | wc -l, to count error lines in a log file. Each individual command (cat, grep, wc) does exactly one thing well, and combining them via pipes produces powerful analyses, without any single program having to bring all these capabilities itself.
Strengths and limits
Bash is therefore especially strong for exactly this kind of automation: build pipelines, cron jobs (regularly recurring automated tasks), server provisioning (a new server is set up automatically), and generally anywhere existing command-line tools need to be combined. For more complex program logic, Bash quickly becomes unwieldy: error handling is cumbersome (exit codes have to be checked explicitly), real data structures like nested objects are practically completely missing, and the syntax for conditions/loops is considered idiosyncratic and error-prone even among experienced developers (whitespace in the “wrong” place in an if statement leads to cryptic errors). For anything beyond simple command chaining, people therefore tend to reach for Python or a full-fledged programming language instead.
Bash in CI/CD pipelines
Bash scripts remain the backbone of many CI/CD pipelines (see CI/CD Pipeline) to this day — even though modern tools like GitHub Actions use their own YAML configurations, the individual steps within them ultimately mostly execute perfectly normal shell commands. This tight interlinking with the command line makes basic Bash knowledge relevant even for developers who would otherwise never consciously write scripts — at the latest when debugging a failed pipeline, you almost always end up looking at raw shell commands.