Wednesday, September 9 · 9:00 am – 12:00 pm PT · Terminal (macOS) / Git Bash (Windows)
shell-lesson-data.zip on your Desktop, unzipped to a shell-lesson-data folderterminal, hit Entergit bash, hit EnterAdd your OS to your Zoom name - "Sam (Mac)" / "Sam (Windows)" - so helpers know which instructions apply
Setup / install: swcarpentry.github.io/shell-novice/#setup · Linux: your normal terminal, nothing to install
$ - the prompt. Don't type it; type what comes after.shell-lesson-data.zip from swcarpentry.github.io/shell-novice/#setup, unzipped to a shell-lesson-data folder.You should see exercise-data/ and north-pacific-gyre/.
Post in chat: a green check when you see those two folders, a red x if not.
Helpers: DM the setup + data links to anyone with a red x; take them into a breakout if needed.
$ is the prompt - "ready for input"On an HPC cluster your job is a Bash script handed to a scheduler. Reproducibility tools - Snakemake, Nextflow, Docker, CI - are shell orchestrators. AI agents like Claude Code and Cursor run in a terminal you supervise.
On Zoom: in the chat - where have you hit a wall that a terminal would have gotten you past?
Nelle is back from a 6-month survey with 1520 sample files. Each has to go through one analysis program. By hand: open, run, save - 1520 times, ~12 hours of clicking.
Today's six episodes are the steps that let her computer do that while she writes her paper.
On Zoom: in the chat - one repetitive file task that has eaten an afternoon of your time.
pwd tells you where/Users/you/Desktop/ root · ~ home · . here · .. one level up/ and means the same anywhere; relative is from where you standcd with no argument always returns therels), or several of each-s and -S are different optionsls-F - and the shell looks for a command called ls-Fman ls (q quits) or ls --help> - send output to a file instead of the screen (overwrites, no prompt)>> - append to a file instead of overwriting| - send output straight into the next command, no temp fileThree files - or three hundred. You don't type the command once per file.
for repeats the block once per item in the list$thing reads its value> while the shell waits for done - not broken, just waitingecho in front of the commands = a dry run: see what it would do before it does itbashpwd / ls / cd - know where you are, always-; man and --help list them/ root, . here, .. up, ~ homenano, mkdir, mv, cp, rm - and rm has no undo* and ? match many files; the shell expands them firstwc counts; sort/head/tail/cut/uniq transform> writes a file, >> appends, | feeds the next commandfor … do … done repeats a command over a listecho in front of a loop = a safe dry run"$@" lets the caller pick the files