https://github.com/watson/old-unix-spell-checker
A modern recreation of the UNIX spell checker example from "The UNIX Operating System" video
https://github.com/watson/old-unix-spell-checker
history unix-command video
Last synced: 4 months ago
JSON representation
A modern recreation of the UNIX spell checker example from "The UNIX Operating System" video
- Host: GitHub
- URL: https://github.com/watson/old-unix-spell-checker
- Owner: watson
- Created: 2017-11-23T12:03:42.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-29T04:54:38.000Z (over 1 year ago)
- Last Synced: 2025-04-30T17:02:04.132Z (about 1 year ago)
- Topics: history, unix-command, video
- Language: Shell
- Size: 5.86 KB
- Stars: 41
- Watchers: 2
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Old UNIX Spell Checker
In an old video from Bell Labs, [Brian
Kernighan](https://en.wikipedia.org/wiki/Brian_Kernighan) introduces the
audience to the concept of pipelines in UNIX systems using a simple
spell checking example:
[](https://youtu.be/tc4ROCJYbm0?t=384)
Most of the programs used in the spell checking example are not present
in modern UNIX variants. For fun I wanted to see how easy it would be to
recreate the same capabilities today.
The example operates on a text file called
[`sentence`](https://github.com/watson/old-unix-spell-checker/blob/master/sentence):
```
At Bell Laborotories
UNIX systems privide
more timesharing ports
than all other systems
combined
```
The original chain of commands used in the video are:
```
makewords sentence | lowercase | sort | unique | mismatch
```
Only the `sort` program still exists today. And the `unique` program
have been renamed to `uniq` on most systems.
This means we need to re-create `makewords`, `lowercase` and `mismatch`.
This repository contains those 3 programs.
To run them locally, simply clone this repository and run the following
pipeline:
```
./makewords sentence | ./lowercase | sort | uniq | ./mismatch
```
The output of this command is:
```
laborotories
ports
privide
systems
timesharing
unix
```
For more awesome old videos of computer history, check out [Awesome
Computer History](https://github.com/watson/awesome-computer-history).
## License
[](https://creativecommons.org/publicdomain/zero/1.0/)
To the extent possible under law, [Thomas
Watson](https://github.com/watson) has waived all copyright and related
or neighboring rights to this work.