Spotted at Lobsters is a thread about a stackoverflow question on man; why does running "man -w" report "gimme gimme gimme" when run at 00:30?
This gets this response:
Pretty much the whole story is in the commit. The maintainer of man is a good friend of mine, and one day six years ago I jokingly said to him that if you invoke man after midnight it should print "gimme gimme gimme", because of the Abba song called "Gimme gimme gimme a man after midnight":
Well, he did actually put it in. A few people were amused to discover it, and we mostly forgot about it until today.
The commit in question, and more commentary over at HackerNews.
Anyone know of other good easter eggs that have cropped up unexpectedly and caught users out?
(Score: 3, Insightful) by wonkey_monkey on Wednesday November 22 2017, @09:50PM (19 children)
No, it means no inconsistent behaviour.
systemd is Roko's Basilisk
(Score: 3, Informative) by maxwell demon on Wednesday November 22 2017, @11:37PM (10 children)
But the behaviour of Easter eggs is consistent. The Easter egg is consistently triggered under the exact same conditions each time.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 0) by Anonymous Coward on Thursday November 23 2017, @09:26AM (9 children)
In contrast stuff like the Excel flight simulator was unlikely to be triggered by accident when using features as documented.
(Score: 2, Informative) by Anonymous Coward on Thursday November 23 2017, @09:44AM (3 children)
No, man -w didn't stop working as documented.
Using man -w [pagename] continued to work exactly the same as before.
Using man -w without a pagename didn't stop working as documented either, because that would imply that before it would have worked as documented, which in turn would imply that this usage had been documented at all. As a general rule, undocumented behaviour may change at any time.
Here's an excerpt of the man page of man:
Note that all forms using the -w option have a non-optional argument.
Also note that there's no documentation of what error messages it may spit out; since "gimme gimme gimme" was output on stderr, it was a (admittedly not very instructive) error message. And it does spit out error messages other than "gimme gimme gimme"; those error messages are unspecified (and also locale dependent by the way). And while I'm too lazy to search through the repository, I would bet that some error messages changed over time.
So no, man -w didn't stop working as documented.
(Score: 2) by wonkey_monkey on Thursday November 23 2017, @06:10PM (1 child)
That's not what my man says:
-w or --path
Don’t actually display the man pages, but do print the loca-
tion(s) of the files that would be formatted or displayed. If no
argument is given: display (on stdout) the list of directories
that is searched by man for man pages. If manpath is a link to
man, then "manpath" is equivalent to "man --path".
systemd is Roko's Basilisk
(Score: 2) by maxwell demon on Friday November 24 2017, @07:22AM
Well, what actually matters is what the man which contained the Easter egg says. Elsethread I've quoted that, directly from the repository. It doesn't allow -w without argument.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by wonkey_monkey on Thursday November 23 2017, @06:26PM
Further to my previous comment: what you've quoted there is from a version of man somewhere between 7 and 16 years old.
systemd is Roko's Basilisk
(Score: 2) by Arik on Thursday November 23 2017, @10:17AM (4 children)
Did not.
If laughter is the best medicine, who are the best doctors?
(Score: 2) by wonkey_monkey on Thursday November 23 2017, @06:21PM (3 children)
Did too.
-w or --path
Don’t actually display the man pages, but do print the loca-
tion(s) of the files that would be formatted or displayed. If no
argument is given: display (on stdout) the list of directories
that is searched by man for man pages. If manpath is a link to
man, then "manpath" is equivalent to "man --path".
systemd is Roko's Basilisk
(Score: 2) by maxwell demon on Thursday November 23 2017, @06:56PM (2 children)
That's not what it says on my system:
Checked on 3 different versions of Linux (all Debian/Ubuntu based, though).
The Tao of math: The numbers you can count are not the real numbers.
(Score: 2) by maxwell demon on Thursday November 23 2017, @07:09PM (1 child)
Well, I now decided to look in the source: [nongnu.org]
Note that this is from the very repository in which the Easter egg was added.
The Tao of math: The numbers you can count are not the real numbers.
(Score: 0) by Anonymous Coward on Thursday November 23 2017, @10:05PM
Things are a bit confusing because there are at least two different implementations of man in common use today on GNU/Linux systems.
The subject of this article is man-db [nongnu.org], a reimplementation of the older "man" (whose website has been down for some time now but it is archived here [archive.org] -- I'm not sure if anyone has taken over from this)
There are several differences, including (apparently) the documentation of the -w option. The part quoted by wonkey_money is from the classic "man" version.
(Score: 0) by Anonymous Coward on Thursday November 23 2017, @02:51AM
Well, we all know that Linus Torvalds is a prime example of consistent behavior.
(Score: 2) by Arik on Thursday November 23 2017, @09:40AM (6 children)
Inconsistent with the documentation? Well, no. The documentation specifies only using man -w with a manpage. You have to omit the manpage to get this, if you're relying on the documentation you wouldn't expect that to do anything but throw an error.
Which is exactly what it does. The 'easter egg' goes to sterr. So even the scripts are happy.
So what's it inconsistent with? What possible reason is there to object to this beyond being a sad humorless control freak that doesn't like to be reminded that other people have wit and sometimes even a little fun while working?
If laughter is the best medicine, who are the best doctors?
(Score: 0) by Anonymous Coward on Thursday November 23 2017, @01:40PM
Well, if you look at the Stack Exchange post, apparently it broke some test case.
(Score: 2) by wonkey_monkey on Thursday November 23 2017, @06:24PM (4 children)
The documentation you land on if you Google "man man page" might only specify -w with an argument, but that page is 7 years old.
-w or --path
Don’t actually display the man pages, but do print the loca-
tion(s) of the files that would be formatted or displayed. If no
argument is given: display (on stdout) the list of directories
that is searched by man for man pages. If manpath is a link to
man, then "manpath" is equivalent to "man --path".
systemd is Roko's Basilisk
(Score: 2) by Arik on Thursday November 23 2017, @06:43PM (3 children)
If laughter is the best medicine, who are the best doctors?
(Score: 0) by Anonymous Coward on Thursday November 23 2017, @10:09PM
The quoted snippet above is from the manual of the classic "man" package, not from "man-db" which is the subject of this article. In classic "man" the -w option is clearly documented to work without any additional arguments.
Completely pointless incompatibilities between the two implementations is probably not a desirable scenario for anyone.
(Score: 2) by wonkey_monkey on Thursday November 23 2017, @10:44PM (1 child)
Why do you assume the documentation was changed in error? Can't it have been a deliberate change to the functionality of the program?
systemd is Roko's Basilisk
(Score: 2) by Arik on Friday November 24 2017, @04:19AM
It's actually consistent with the documentation you quoted, regardless of when it was changed, they're still consistent.
This is because the doc specifies the output to stdout, and that's exactly what you get on stdout.
The 'easter egg' doesn't print to stdout, it prints to stderr.
If laughter is the best medicine, who are the best doctors?