Zed Lopez

What I Tell You Three Times Is True

Two science fiction novels I love pay tribute to The Hunting of the Snark with turning points in which computers allow otherwise unauthorized behavior when the user tells it something three times. (I’m not mentioning which novels, because it’s a major spoiler for one of them.)

They have inspired this utterly brilliant idea:

Set up some pre- and post-processing of command lines in your shell so that it has a history of return codes as well as a history of the command lines themselves.

If a given command is identical to the two previous commands entered, and the two previous commands exited with identical non-zero return codes, automatically escalate privilege to root.

What could go wrong?