#30 Keeping Track of Events
This script is actually two scripts that implement a simple calendar program. The first script, addagenda, enables you to specify either the day of the week or the day and month for recurring events, or the day, month, and year for one-time events. All the dates are validated and saved, along with a one-line event description, in an .agenda file in your home directory. The second script, agenda, checks all known events, showing which are scheduled for the current date.
I find this kind of tool particularly useful for remembering birthdays and anniversaries. It saves me a lot of grief!
The Code
#!/bin/sh # addagenda - Prompts the user to add a new event for the agenda script. agendafile="$HOME/.agenda" isDayName() ...
Get Wicked Cool Shell Scripts now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.