On this date...

I’m taking it easy today. It is, after all, Labour Day in Australia, Independence Day in Nigeria, Armed Forces Day in South Korea, National Liberation Day in China and a public holiday in Botswana.

Oh, and Happy Birthday to Jimmy Carter who’s 79 today.

“Why Jeremy”, you may be thinking, “you’re quite the font of date related knowledge, aren’t you?”

Not at all, dear reader. It’s all courtesy of some geekery in OS X.

I stumbled across a site called xlab which has a wealth of OS X tips and tricks. In one post, Paul Bissex points out the existence of an unusual folder in the filesystem. Open up the Terminal and see for yourself:

cd /usr/share/calendar

Within that folder, there are a number of calendar files. Type:

ls -la

and you’ll see:

calendar.birthday, calendar.christian, calendar.computer, calendar.history, calendar.holiday, calendar.judaic, calendar.music, calendar.usholiday

“All very interesting”, you might (not) be thinking, “but what does it mean to me?”

Patience, beloved peruser of my journal, I’m getting to that.

Open up the Terminal and type:

cat /usr/share/calendar/* | grep `date +”%m/%d”`

You’ll get a list of events that happened on this day.

“Pretty cool”, you may remark, “but I’m not going to remember to type that every time I want to see what’s what.”

Would I forsake you, beloved and now slightly irritating reader of mine?

Open up Terminal and type this into your command line:

sudo pico .tcshrc

You’ll be asked for your password and then you’ll be editing your .tschrc file. Add this line to it:

alias today “cat /usr/share/calendar/* | grep `date +”%m/%d”`;”

Write it out (ctrl+o) and close pico (ctrl+x) and then close the terminal window.

Now whenever you open up the Terminal, all you have to type is “today” to get a list of the day’s birthdays and anniversaries.

Don’t thank me, dear OS X using reader, thank a site called xlab.

Now LazyWeb, how about fixing me a cron job that runs that command and emails me the output every morning?

Also on AMP

Have you published a response to this? :