Learn Shell Scripting: 39 Flashcards on Shebangs, POSIX vs Bash and the Unix Toolbox
Study shell scripting with 39 flashcards: shebang, POSIX, bash vs dash vs zsh, bashisms, pipelines, sed, awk, grep, plus the syntax cards worth adding.

Studying. But it's also a video game. 🎮
Flashcards, quizzes and games that make you actually remember.
Posted by
Related reading
Study Guide: CI/CD Concepts & Tools in 35 Flashcards (Delivery vs Deployment)
Study CI/CD with deck XR8592: continuous integration, delivery vs deployment, atomic commits, feature toggles, staging, plus the deployment cards to add.
Memorize Kubernetes Essentials: 49 Flashcards on Pods, Services and Controllers
Kubernetes Essentials deck CW7729: 49 flashcards on pods, Services, StatefulSets, probes, RBAC and Helm, with decision cards and 3 outdated backs to update.
Master Docker: 58 Flashcards on Commands, Dockerfiles and Compose
Learn Docker from 58 real flashcards: CLI commands, Dockerfile instructions, Compose, networks and multi-stage builds, plus the two cards you should fix first.
Flip It deck OM8737 — Shell Scripting (39 cards) is less a syntax drill than a map of the shell world: what a script is, which shell runs it, which Unix tools it leans on and why big scripts eventually get rewritten in another language. Learn it as the context layer, then add the syntax yourself.
Study this deck: Shell Scripting
1 / 10Shell script
Tap the card for the answer · swipe right if you knew it, left if not
Key cards
| Front | Back (from the deck) |
|---|---|
| Shebang | A comment starting with #! that tells the system which interpreter runs the script |
| Where must the shebang be located? | The first line of the file |
| Dash | Debian Almquist shell, a minimal POSIX shell often used as /bin/sh for speed |
| Bashisms | Bash-only features not in POSIX, which reduce portability |
| Wrapper script | Sets up the environment, runs a program, cleans up or logs |
| Printf | Formatted output, more portable than echo across shells |
| Pipeline | The output of one command becomes the input of the next with the | operator |
| Larry Wall on portability | It's easier to port a shell than a shell script |
What you'll cover
Shells: Bourne shell (sh), Bash, Dash, Zsh, KornShell (ksh), C shell (csh/tcsh), Fish, PowerShell (pwsh), POSIX, Cygwin.
Script anatomy: shebang, # comments, .sh extension (often none), for loops, if, > redirection, dotfiles, wrapper scripts.
Toolbox: ls, clear, printf, sed, awk, grep, pipelines, make, Perl, Tcl.
Trade-offs: same syntax as the interactive prompt, slow process-per-command execution, typo risk (the infamous rm -rf * / with a stray space), why scripts get ported to other languages.
Two tips specific to this deck
Sort the shells on one axis: POSIX or not. sh, dash, ksh and bash (in POSIX mode) sit on one side; csh, fish and PowerShell on the other. Then tag the defaults that the cards blur: on Debian and Ubuntu /bin/sh is dash, macOS has used zsh as its login shell since Catalina (2019), and zsh's compatibility mode emulates sh/ksh, not bash (card 12). Card 14's claim that ksh was replaced by zsh is a simplification — ksh93 still ships on AIX and Solaris.
Write the syntax cards the deck leaves out. Only one operator (>) and two keywords (for, if) appear, so add about ten cards you can actually type: chmod +x, $var vs "$var" quoting, $? exit codes, [ ] / test, while, case, functions, >> and 2>&1, $(command) substitution and set -euo pipefail. Turn card 19 into a habit card too: quote variables and never run rm -rf "$dir/" without checking $dir is non-empty.
Where to find it
Open Flip It and search OM8737 in the library. For the commands your scripts will call — find, chmod, xargs, tar — continue with our Linux command line study guide.
Ready to learn faster? 🚀
Join FLIP IT for free and turn studying into a game.