LmCast :: Stay tuned in

The Unix Pipe Card Game

Recorded: Jan. 21, 2026, 11:03 a.m.

Original Summarized

The UNIX Pipe Card Game

The UNIX Pipe Card Game

This is a card game for teaching kids how to combine unix commands through pipes.
This game assumes the parent knows the basic unix commands: cat, grep, tail, head, wc, sort, uniq. The parent should show also show those commands in action the computer as well, if you do not have any UNIX system you can use jslinux in your browser.


Buy now: €5,00 EUR [ soldout ]

print it yourself: unix-pipe-cards.pdf, unix-pipe-box.pdf
code: unix-pipe-game
author: github.com/jackdoe
co author: Jackie
contact: b0000@fastmail.com
license: CC BY 4.0

If you want to play the more difficult version, you can also get the Expansion pack: UNIX Pipe Game - Process Substitution

Example game round:

task: print the most common line from a file, we need to first cat the file (in our case the file is card 03.txt), then sort it, uniq count it, then do numeric sort, then tail -1:

cat 03.txt | sort | uniq -c | sort -n | tail -1

RULES:

> 0. The youngest player chooses one of
two formats for the game:

* Whoever has the smallest pipe chain to
complete the task wins the round.
* Whoever has the largest pipe chain to
complete the task wins the round.

> 1. The youngest player picks a task
from the tasks card. You can not pick
the same task twice.

> 2. Shuffle the cards.

> 3. Put the cards face down on the
table.

> 4. Going clockwise each player picks
the top card from the deck and tries
to complete the task.

> 5. The first player who completes the
task gets a point.

> 6. IF there are no more tasks, GOTO 8

> 7. GOTO 1.

> 8. GAME OVER. INSERT COIN. GOTO 8

TASKS

* print the second line

* print the second to last line

* print the 7th line

* print the most common line

* print the least common line

* count how many lines have "rises"

* print the first line that has W in it

* count the lines that have "in" in them

* show two random lines

* count the words on the last two lines

* print the 7th and 8th line

* count the lines with !

* count the lines without !

* make a command chain that does not
print anything

This is how the card decks look:

If you are a parent teaching your kid, and is exploring more tools to help you, I made few other card games:

Programming Time, which is a game to teach python and some more fundamental algorithms, from hash tables to RSA

The C Pointer Game - Pointers, Arrays and Strings, a game to teach kids to look at the computer memory and understand references and values

4917, a game to teach kids machine code and how the CPU works with memory and registers

The Unix Pipes Game - Process Substitution, an expansion of the Unix Pipes Game to teach process substitution and also: paste, tr, cut, bc

RunLength Encoding for Kids, small cards "game" to explain runlength encoding

PUNK0 - The Function Composition Card Game, use cards to manipulate a list and use its values to win the game

PROJEKT: OVERFLOW, RISCV assembler boardgame

Programming for kids, a log of my journey of teaching my daughter how to code

The UNIX Pipe Card Game presents a novel approach to introducing children to the fundamental concepts of Unix command-line processing through a card-based game. Designed as an educational tool, it leverages the familiar structure of a card game to facilitate learning about commands like `cat`, `grep`, `tail`, `head`, `wc`, `sort`, and `uniq`. The game’s core mechanic centers around constructing command chains – sequences of these commands – to fulfill given tasks. It’s specifically targeted toward parents who are interested in introducing their children to the complexities of Unix systems. The game facilitates hands-on learning, encouraging participants to experiment with different command combinations to achieve desired results. The availability of jslinux, a browser-based Unix environment, removes the barrier of needing a specific operating system to play, greatly expanding accessibility.

The game’s structure incorporates elements of competitive gameplay, with the objective of minimizing the length of the command chain created to complete a task. The two formats (smallest pipe chain vs. largest pipe chain) introduce a strategic dimension, prompting players to consider not only the efficacy of the command sequence, but also the efficiency of building it. The rules outline a straightforward progression: a youngest player initiates the game by selecting either of the two formats. Subsequently, all players take turns selecting a task card. The first player to successfully complete the given task is awarded a point. The game continues until all task cards have been drawn, at which point the game ends, and a coin is inserted (symbolically, of course).

A significant aspect of the game is the diverse range of tasks presented, offering varied levels of difficulty and encouraging exploration across different command functionalities. These tasks include basic operations such as printing specific lines from a file, or counting lines containing certain keywords. More complex tasks involve cumulative operations, requiring players to orchestrate multiple command sequences. The card deck contains specific instructions for tasks like identifying the most common line, the least common line, or creating a command chain that purposefully produces no output.

Beyond the primary game, the accompanying documentation outlines additional card games designed to bolster the educational experience. “Programming Time” focuses on teaching core Python algorithms and data structures, while “The C Pointer Game” aims to help children develop an understanding of pointers and memory management. Furthermore, games like “4917” and “PROJEKT: OVERFLOW” offer dedicated learning experiences related to machine code, CPU architecture, and RISC-V processors. Finally, the game card deck includes expansion packs for “The Unix Pipes Game,” specifically focusing on process substitution. The creator’s desire to share their experiences in teaching their daughter’s coding journey is evident in this portfolio of games - a series of efforts to create engaging learning experiences around programming concepts.