typestar

Languages

Bash

The language everyone uses and almost nobody studies.

First released
1989
Created by
Brian Fox, for the GNU Project
Typing
Dynamic; everything is a string until arithmetic says otherwise
File extensions
.sh, .bash

What it is for

Bash is the connective tissue of computing. It is the default shell on most Linux systems, the language of CI pipelines, Dockerfiles' RUN lines, deploy scripts, cron jobs and the dotfiles that make a machine yours. Nobody's job title says bash, and nearly every technical job uses it weekly. That mismatch is exactly why deliberate practice pays: the language is everywhere and almost always learned by copy-paste.

As a language it is stranger than it looks. Everything is a string, quoting is semantics rather than style, and the exit code of the last command silently steers && and || and if. The good parts are genuinely good: pipelines compose small tools into one-liners other languages need libraries for, and process substitution, parameter expansion and traps solve real problems in very few characters.

Its limits arrive on schedule. Arithmetic is integers only, arrays are awkward, error handling is set -euo pipefail and hope, and past a few hundred lines a Python rewrite is usually the right call. Knowing where that line sits — and writing clean, shellcheck-passing scripts up to it — is the actual skill.

Where it came from

Brian Fox wrote bash for the GNU Project, releasing it in 1989 as a free replacement for Steve Bourne's 1977 Unix shell — the name is Bourne-Again SHell. It absorbed the interactive comforts of csh and ksh (history, job control, completion) while staying compatible with the Bourne scripts the world already ran.

Linux distributions adopted bash as their default shell in the early 1990s, and it rode Linux into every server room, then every container. POSIX standardized the shell language's core in 1992; bash implements the standard and extends it — arrays, [[ ]], process substitution — which is why 'works in bash' and 'works in sh' are different claims.

Version 3 (2004) brought regex matching in [[ ]], version 4 (2009) associative arrays and mapfile, version 5 (2019) faster and stricter everything. macOS froze its bundled bash at 3.2 over licensing and switched its default to zsh in 2019, which is why 'bash on a Mac' usually means a museum piece unless Homebrew intervened.

What it is like to type

Bash types unlike anything else here: dollar signs and braces arrive constantly, quotes open and close around nearly every expansion, and the punctuation runs [[ double brackets ]], (( arithmetic )) and $( substitution ) in close rotation. Expansion-heavy seeds carry lower three-star bars for exactly that reason. The reward is muscle memory for the characters real shell work actually uses.

Practice Bash

26 steps across 1 tours, from the basics to complete programs.

The tours

Official documentation

Other languages