One of Terry's links is broken. Here is the
OpenBSD src online and here is the
NetBSD src online (since Terry didn't post it
).
You'll also notice that if you read K&R, a lot of their examples are versions (usually simplified) of the standard UNIX utilities that you'll find in these three source trees.