What is the Easter egg that was lying dormant in the UNIX man command for six years without anyone noticing?



UNIX-based operating systems have man pages that describe how to use commands and functions, and the contents of the man pages can be viewed using the man command ( mandb ). This man command had an Easter egg hidden in it, but it was removed in 2017.

date - Why does man print 'gimme gimme gimme' at 00:30? - Unix & Linux Stack Exchange
https://unix.stackexchange.com/questions/405783/why-does-man-print-gimme-gimme-gimme-at-0030

This Easter egg was discovered in a question posted on StackExchange, a Q&A service for engineers, in 2017.

The poster asked, 'When I run the man command at 12:30am, I get an error message saying 'gimme gimme gimme'. It works fine at other times. Why does it produce this output?'

The correct output you get when you run the man command is:
[code]# man -w
/usr/local/share/man:/usr/share/man:/usr/man
# echo $?
0
# man
What manual page do you want?
# echo $?
1[/code]



And the message that appears when the man command fails at 0:30 is as follows:
[code]# date +%T -s '00:30:00'
00:30:00
# man -w
Gimme gimme gimme
/usr/local/share/man:/usr/share/man:/usr/man[/code]



In response to this question, Marnanell Thurman posted an apology saying, 'Well, I suggested it. Sorry.'

According to Thurman, this Easter egg was first proposed to mandb back in 2011, and can be seen in the commit message below:

Easter egg suggested by Thomas Thurman. - man-db.git - Database-driven manual pager suite
https://git.savannah.nongnu.org/cgit/man-db.git/commit/src/man.c?id=002a6339b1fe8f83f4808022a17e1aa379756d99



Thurman is friends with man-db maintainer Colin Watson, and one day jokingly said, 'If you call man after midnight, it should say 'gimme gimme gimme.'' This is a play on the Swedish pop band ABBA's famous song, 'Gimme! Gimme! Gimme! (A Man After Midnight).'

ABBA - Gimme! Gimme! Gimme! (A Man After Midnight) - YouTube


This song is about a woman's wish for a man to be with her at night. The title and the chorus 'gimme gimme gimme A Man After Midnight' convey the message that she wants a man after midnight. That's why if you run the man command at 12:30am, just after midnight, it will return 'gimme gimme gimme.'

According to Thurman, 'We had no idea that this Easter egg would cause any problems,' and that they had completely forgotten about it until they discovered it six years later.

Watson later fixed the Easter egg by restricting it to only occur when the 'man' command is run alone, without any options or arguments, so that it would not cause an error in practical situations.

Stop Easter egg interfering with non-error cases - man-db.git - Database-driven manual pager suite
https://git.savannah.gnu.org/cgit/man-db.git/commit/?id=84bde8d8a9a357bd372793d25746ac6b49480525



A day after the correction, Watson wrote on StackExchange, 'In the end, the question was meant to make people smile, and I'm glad it made some people smile, and judging by my Twitter notifications, most people found it funny rather than annoying. Still, some people found it annoying, and six years is a pretty good expiration date for a joke,' before removing the Easter egg altogether.

Remove Easter egg entirely - man-db.git - Database-driven manual pager suite
https://git.savannah.gnu.org/cgit/man-db.git/commit/?id=b225d9e76fbb0a6a4539c0992fba88c83f0bd37e

in Software,   Video, Posted by log1i_yk