So… I was gonna check the publish date on this and it’s “January 28, 19102”, which tells me someone didn’t realize that the mktime call returns integer years since 1900, and the correct way to get the current year is to add 1900, not prepend 19… A lot of Perl CGI scripts got caught by this around the turn of the millenium.
What this tells us about shell scripting… well, maybe it’s an Easter egg of sorts.
This is a short introduction to the Bourne shell by Stephen Bourne himself. You see this around the internet a lot. The dates vary a lot, and people sometimes edit the contents too. I think people make PDFs and webpages out of the original troff sources. (E.g., here, where the author says “I found the source at http://cm.bell-labs.com/7thEdMan/vol2/shell.bun and generated my own copy with troff, which I then edited into an HTML version.”) The dates may be automatically (or semi-automatically) generated from that, and (as you say) mistakes get made.
I have a PDF of volume 2 of Unix Programmer’s Manual from 1983; the original version of that manual seems to be from 1978, based on dates in the PDF. This introduction to the UNIX shell is chapter 6 of that book, and the chapter is dated November 12, 1978.
So… I was gonna check the publish date on this and it’s “January 28, 19102”, which tells me someone didn’t realize that the
mktime
call returns integer years since 1900, and the correct way to get the current year is to add 1900, not prepend 19… A lot of Perl CGI scripts got caught by this around the turn of the millenium.What this tells us about shell scripting… well, maybe it’s an Easter egg of sorts.
This is a short introduction to the Bourne shell by Stephen Bourne himself. You see this around the internet a lot. The dates vary a lot, and people sometimes edit the contents too. I think people make PDFs and webpages out of the original troff sources. (E.g., here, where the author says “I found the source at http://cm.bell-labs.com/7thEdMan/vol2/shell.bun and generated my own copy with troff, which I then edited into an HTML version.”) The dates may be automatically (or semi-automatically) generated from that, and (as you say) mistakes get made.
I have a PDF of volume 2 of Unix Programmer’s Manual from 1983; the original version of that manual seems to be from 1978, based on dates in the PDF. This introduction to the UNIX shell is chapter 6 of that book, and the chapter is dated November 12, 1978.
The wikipedia page for Bourne shell lists the official release date as 1979, but the same page also refers to sources from a version released in October of 1978. With that in mind, and after reading the reminder about suggesting changes, I’ve suggested adding “(1978)” to the title.
Haha. I did notice and was curious. I do wonder if all this shell talk will lead us to Raku, perhaps?