Displaying reminder messages
You can display a reminder message by reading a file named calendar. This file is created in your home directory with the calendar command. The command writes to standard output any line in the file that contains today's or tomorrow's date.
You can read a file named calendar, which you create in your home directory with the filepath command. The command writes to standard output any line in the file that contains today's or tomorrow's date.
The calendar command recognizes date formats such as Dec. 7 or 12/7. It also recognizes the special character asterisk (*) when it is followed by a slash (/). It interprets */7, for example, as signifying the seventh day of every month.
On Fridays, the calendar command writes all lines containing the dates for Friday, Saturday, Sunday, and Monday. The command does not, however, recognize holidays. On holidays the command functions as usual and gives only the next day's schedule.
Using a typical calendar file
*/25 - Prepare monthly report
Aug. 12 - Fly to Denver
aug 23 - board meeting
Martha out of town - 8/23, 8/24, 8/25
8/24 - Mail car payment
sat aug/25 - beach trip
August 27 - Meet with Simmons
August 28 - Meet with Wilson
To run the calendar command, type:
calendar
If today is Friday, August 24, the calendar command displays the following:
*/25 - Prepare monthly report
Martha out of town - 8/23, 8/24, 8/25
8/24 - Mail car payment
sat aug/25 - beach trip
August 27 - Meet with Simmons
Using a calendar file that contains an include statement
A calendar file that contains an include statement might look like the following:
#include </tmp/out>
1/21 -Annual review
1/21 -Weekly project meeting
1/22 *Meet with Harrison in Dallas*
Doctor's appointment - 1/23
1/23 -Vinh's wedding
To run the calendar command, type:
calendar
If today is Wednesday, January 21, the calendar command displays the following:
Jan.21 Goodbye party for David
Jan.22 Stockholder meeting in New York
1/21 -Annual review
1/21 -Weekly project meeting
1/22 *Meet with Harrison in Dallas*
The results of the calendar command indicate the /tmp/out file contained the following lines:
Jan.21 Goodbye party for David
Jan.22 Stockholder meeting in New York