|
|
View upcoming events on multiple Unix calendars
I like the way you gus ahve done this. I may switch, but in the meantime, this is how I have mine setup. It is in my .profile file:
echo 'Today in history:'Gets the job done nicely.
View upcoming events on multiple Unix calendars
Nice! I modified it slightly:
View upcoming events on multiple Unix calendars
That's a nice hint - I do have to point out the UUOC, though; you can simplify the command to this:
-Ken
The Ruby version
I made this a Ruby script to iterate through the next 7 days of holidays. (Strangely, Memorial Day is not listed??) Save as something like "calendar.rb" and make executable (chmod +x calendar.rb) and run... The reason I commented out the alternate "date" code is because I wanted a solution that didn't depend on any include/requires (even though "date" is part of the standard lib...)
#!/usr/bin/env ruby---
View upcoming events on multiple Unix calendars
While this works for most cases, it fails for the more complex date specifications that calendar understands. For example:
% % grep -v '[0-9][0-9]/[0-9][0-9]' /usr/share/calendar.* | less
calendar.australia:Mar 18 Canberra Day (ACT)
(textual month specification)
calendar.australia:8/MonFirst Bank Holiday (ACT, NSW)
("first monday of the month")
calendar.christian:Easter-46 Ash Wednesday (First day of Lent)
calendar.christian:Easter-7 Palm Sunday (7 days before Easter)
(Easter-relative dates)
It also ignores multi-line specifications:
01/28 Space Shuttle Challenger (51-L) explodes 74 seconds after liftoff killing Scobee, Smith, McNair, Resnick, Jarvis, Onizuka and McAuliffe, 1986 |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.18 seconds |
|