
Today in History, Brought to You by Unix - thefilmore
https://akr.am/blog/posts/today-in-history-brought-to-you-by-unix
======
peterwwillis
If you like Calendar, you might like Fortune. It's usually in the "bsdgames"
package ([https://www.polyomino.org.uk/computer/software/bsd-
games/](https://www.polyomino.org.uk/computer/software/bsd-games/)). You can
add it to your bashrc file to see a new fortune each time you open your shell.

    
    
      ~$ fortune
      Overload -- core meltdown sequence initiated.
      ~$ fortune
      Politicians are the same all over.  They promise to build a bridge even
      where there is no river.
              -- Nikita Khrushchev
      ~$ fortune
      Distress, n.:
              A disease incurred by exposure to the prosperity of a friend.
                      -- Ambrose Bierce, "The Devil's Dictionary"
      ~$ fortune
      The Preacher, the Politician, the Teacher,
              Were each of them once a kiddie.
      A child, indeed, is a wonderful creature.
              Do I want one?  God Forbiddie!
                      -- Ogden Nash

~~~
smhenderson
Add a little fun to that by letting a cow tell your fortune with cowsay[1].

fortune | cowsay

[1]
[https://en.wikipedia.org/wiki/Cowsay](https://en.wikipedia.org/wiki/Cowsay)

------
AdmiralAsshat
I think the coolest part of this was looking at the shell script for
/usr/bin/calendar. It's personally gratifying to know that even the UNIX guys
wrote scripts that shellcheck.net would crap all over:

[https://imgur.com/o4gCthk](https://imgur.com/o4gCthk)

------
bespoke_engnr
Oh cool!

$ calendar

Sep 13* Rosh Chodesh Tishrei (Beginning of the month of Tishrei)

Sep 13* First Day of Rosh Hashanah (Jewish New Year; 5768; sabbatical)

Sep 13 Barry Day commemorates the death of Commodore John Barry, USA

Sep 13 Chiang Kai-Shek becomes president of China, 1943

Sep 13 Building of Hadrian's Wall begun, 122

Sep 13 British defeat the French at Abraham near Quebec City, 1788

Sep 13 58� C (136.4� F) measured at el Azizia, Libya, 1922

Sep 13 Walter Reed born, 1851

Sep 14 Francis Scott Key writes words to "Star Spangled Banner", 1814

Sep 14* Rosh Hashanah (sabbatical)

Sep 14 Battle of San Jacinto in Nicaragua

Sep 14 Frodo & Bilbo's birthday

Sep 14 The US Selective Service Act establishes the first peacetime draft,
1940

Sep 14 Salem, Massachusetts, is founded, 1629

Sep 14 Benjamin Franklin is sent to France as an American minister, 1778

------
contingencies
Has anyone tried altering this to use the Wikipedia data? eg.
[https://en.wikipedia.org/wiki/September_13](https://en.wikipedia.org/wiki/September_13)

The most appropriate sections seem to be _Events_ and _Holidays and
Observances_. There are also links to parallel daily databases by the BBC and
New York Times.

------
stepvhen
It comes in the base of OpenBSD, and I use it in lieu of a calDAV server.
Being able to quickly jot down an appointment and recall it on the command
line is hecka useful.

------
nineteen999
Why anyone would bother using UNIX or its inferior clones (eg. Windows NT) in
2018 is _beyond_ me.

The year of the Linux desktop already has been and gone, back in 2001.

We are spoiled for choice with a variety of free, modern, microkernel based
desktop OS's written in safe languages, such as Rust, Golang, Haskell and
Java. Why people persist with this monolithic, unsafe, ancient artifact of the
early days of computing is anyone's guess.

------
petercooper
It's not on my macOS, though I am on 10.12. If it's on macOS now, it means
they've added it in the past couple of years which would be interesting.

(Edit: Seems like it might just be me :-D)

~~~
the_watcher
You have to run the commands making the calendar directory and file first.

------
bitofhope
I would not have thought of using cpp(1) like that. I will be using calendar
fron now on. Thanks for the tip.

------
fosco
super neat,

anyone know of a way to search through the history using less or other?

~~~
schoen
You might have the underlying data files in /usr/share/calendar or elsewhere;
you can try to find out with

    
    
      strace -f -e open calendar
    

Alternatively, you can get a full year's worth of output with

    
    
      calendar -l 366

~~~
fosco
oh awesome thanks! seems calendar folder for me is in
/usr/share/calendar/[files here]

