Thursday, April 18, 2019

The Hard Part in Becoming a Command Line Wizard

John D. Cook:

McIlroy’s script was a real example of the kind of wizardry attributed to Unix adepts. Why can’t more people quickly improvise scripts like that?

The exercise that Bentley posed was the kind of problem that programmers like McIlroy solved routinely at the time. The tools he piped together were developed precisely for such problems. McIlroy didn’t see his solution as extraordinary but said “Old UNIX hands know instinctively how to solve this one in a jiffy.”

The traditional Unix toolbox is full of utilities for text manipulation. Not only are they useful, but they compose well. This composability depends not only on the tools themselves, but also the shell environment they were designed to operate in.


You could memorize McIlroy’s script and be prepared next time you need to report word frequencies, but applying the spirit of his script to your particular problems takes work.

1 Comment RSS · Twitter

Bash tools make slippery and uncertain building bricks. (Weakly typed – everything a string, but interpretation varies with gadget option switches).

These days, perhaps real command line wizardry (the ratio of time spent to confidence established) comes faster and more certainly with things like Turtle or Shelly ?

Leave a Comment