~/devtype

Bash Utilities Typing Drills

The shell rewards typing fluency more than any environment: there's no autocomplete for a pipeline you haven't formed yet. Pipes, substitutions, and quoting are the difference between thinking in one-liners and assembling them key by painful key.

LV 1
Level 0 / 100 XP
Best 0 WPM
main.js
00 wpm
00%
0s
1
Just start typing or click the code
Esc restart Enter new line, indentation is skipped for you

Pipelines Are Typed, Not Composed

The pipe character `|` is bash's connective tissue — a Shift-backslash reach that joins every multi-tool command. Real pipelines chain it repeatedly (`grep "404" | awk '{print $7}' | sort | uniq -c`) while alternating between double quotes, single quotes, and awk's brace syntax. Command substitution wraps expressions in `$()`, variable expansion in `${}`, and test brackets pad conditions with mandatory spaces (`[ -d "$dir" ]`).

Loops compress control flow onto single lines with semicolons (`for f in *.log; do ... done`), find commands escape their terminators (`\;`), and redirects aim output with `>`, `>>`, and `2>&1` — the last being three symbols that veteran shell users type as one unit. Every one of these patterns appears in the drills because every one appears in real terminal sessions.

Key Drills for Bash Utilities:

  • Pipe reflex: Shift-backslash must be instant — it's the key that turns commands into pipelines.
  • Know your quotes: Double quotes expand, single quotes don't. Drill switching between them mid-command.
  • Dollar constructs: `$()`, `${}`, `$1`, `$?` — the dollar sign leads bash's most powerful syntax. Chunk each form.

Sample Drill: Search, Sort & Filter Logs

Pipelining multiple tools (grep, awk, sort, uniq) to inspect logs.

bash-pipe · medium
cat /var/log/nginx/access.log | grep "404" | awk '{print $7}' | sort | uniq -c

All 15 Bash Utilities Drills

Every session picks a random drill from this pool. Use the difficulty filter above to stay on easy warm-ups or jump straight to the hard ones.

  • Find, Xargs & Permissions easy

    Locating files by pattern and batch-updating permissions.

  • Archive and Compress easy

    Create, list and extract tarballs and search a gzipped log.

  • Bulk Rename Extensions easy

    Rename files with parameter expansion, skipping unmatched globs.

  • HTTP Health Check easy

    Fail a script when an endpoint does not return status 200.

  • Counting Things easy

    Quick counts of lines of code, TODOs and most used commands.

  • Search, Sort & Filter Logs medium

    Pipelining multiple tools (grep, awk, sort, uniq) to inspect logs.

  • Awk Group Averages medium

    Average a CSV column per key with awk associative arrays.

  • Sed Edits medium

    In-place replace, range printing, date reordering and comment stripping.

  • jq API Processing medium

    Filter GitHub API JSON to TSV and edit package.json with jq.

  • Read CSV Rows medium

    Loop over CSV fields with read and process substitution.

  • Directory Backup Script hard

    Looping through folders to create zipped archives.

  • Strict Mode and Cleanup hard

    Fail fast with set -euo pipefail and clean temp files in an EXIT trap.

  • Getopts Argument Parsing hard

    Parse flags with values, report missing arguments and shift positionals.

  • Retry with Backoff hard

    Retry any command with exponential backoff up to a maximum attempt count.

  • Bounded Parallel Jobs hard

    Run SSH commands in parallel with a job limit and count failures.

The Symbols That Slow You Down

The keystrokes below are where Bash Utilities typing speed is won or lost. Key positions shown for QWERTY — the pattern transfers to any layout, just on different physical keys.

Symbol Used For Keys How to Drill It
| Pipe Shift+Backslash Bash's connective tissue — the farthest reach on the board, typed constantly. It must cost nothing.
&& And-list Shift+7 twice Chain commands on success: `cd deploy && ./run.sh`. Two even Shift-7 strikes.
$() Command substitution $ as Shift+4, then () as Shift+9 and Shift+0 Nesting commands inside commands. Dollar-paren opens; close the paren before you forget.
>> Append redirect Shift+Period twice `>` overwrites, `>>` appends — the doubled Shift-period is the one you must not mistype.
~ Home shortcut Shift+Backtick `cd ~/projects` — the top-left reach appears in paths constantly.
* Glob Shift+8 `*.log`, `rm build/*` — Shift-8 in argument position expands to everything. Type it reflexively.

Common Bash Utilities Typing Mistakes

  • ✗ Reaching for the pipe slowly — if `|` breaks your sentence-thought, pipelines will always feel manual.
  • ✗ Mixing quote types mid-command: double quotes expand, single quotes don't. Drill switching within one line.
  • ✗ Missing the spaces inside test brackets — `[ -d "$dir" ]` needs them, so type the whole idiom as a memorized string.

What's a Good Bash Utilities Typing Speed?

Shell fluency shows in one-liners: 35–50 WPM with 96%+ accuracy is solid working speed. If composing `grep | awk | sort | uniq -c` feels like assembly, drill the pipeline pattern until it's one sentence.