Skip to content(if available)orjump to list(if available)

Fortune(6) – Linux Man Page

Fortune(6) – Linux Man Page

10 comments

·February 24, 2025

js2

A tale about Perl array vs scalar context and `fortune` has gone missing from the internet (edit: found it, see below). I'll do my best to recount it.

The story goes a kid in high school setup a web page that displayed fortunes from, well, fortune. He did this via a Perl CGI program. Perl has the concept of scalar vs array context, and there was a bug in his code such that when it read the output from `fortune`, it truncated to the first line.

One day, fortune spit out the following quote just as a teacher was viewing the page:

I put the shotgun in an Adidas bag and padded it out with four pairs of tennis socks, not my style at all, but that was what I was aiming for: If they think you're crude, go technical; if they think you're technical, go crude. I'm a very technical boy. So I decided to get as crude as possible. These days, thought, you have to be pretty technical before you can even aspire to crudeness. I'd had to turn both those twelve-gauge shells from brass stock, on the lathe, and then load then myself; I'd had to dig up an old microfiche with instructions for hand-loading cartridges; I'd had to build a lever-action press to seat the primers -all very tricky. But I knew they'd work. -- Johnny Mnemonic

Unfortunately due to the kid mistaking scalar vs array context, only the first line of the paragraph was displayed: I put the shotgun in an Adidas bag and padded it out with four pairs of tennis socks.

Missing the attribution, the teacher did not recognize this as a book quote. This resulted in police being called on the kid. Fortunately it was resolved w/o incident.

Now, I may be misremembering the story which isn't mine. I vaguely recall that maybe it was something Tom Christiansen used to tell? Maybe it appeared on Slashdot? Maybe it's apocryphal? I can't find the original.

Edit: Randal Schwartz recounted the story here:

https://web.archive.org/web/20070126150617/http://www.stoneh...

It was originally on Slashdot and I mostly got the details right. :-)

globnomulous

Bugs

The supplied fortune databases have been attacked, in order to correct orthographical and grammatical errors, and particularly to reduce redundancy and repetition and redundancy. But especially to avoid repetitiousness. This has not been a complete success. In the process, some fortunes may also have been lost.

Finding humor in a man page warms the heck out of my heart.

brainlessdev

A while ago I made a fortune database that draws from Marcus Aurelius's Meditations. I used to have a tmux pane that ran them on my work session boot script :)

tbrownaw

I used to have a fortune file where I kept various quotes from Internet communities.

yjftsjthsd-h

I just keep a general quotes file that's all-inclusive. Fun to scroll back through; I do recommend it.

mmsc

Small programs like Fortune and Cowsay are a treasure to the culture of Unix-like OS'.

Kim_Bruning

Though,

fortune | figlet | cowsay --random

Sadly runs into formatting issues.

throwaway984393

It's sad that some distros refuse to package with -o option support anymore

LtWorf

I adopted the fortunes-it package on debian, after I think over 20 years of neglect.

Debian ships the offensive fortunes in a separate .deb so it needs to be installed on purpose, and it's not recommended by the regular one. But it's there.

I actually moved a bunch of stuff into the offensive section, or just removed them. Humour has changed a lot since the last time that package had been touched. Political jokes made little sense, talking about stuff that happened when I was a child and didn't really follow politics.

I was sad that some offensive cowsay ascii arts were removed, but I won't pick that fight so I just got them from the archive and made a .deb that I manually install on my own machines.

snvzz

Somebody could clears throat get offended.