One of the idiosyncrasies of software is the number of commands you have to to remember to exit. It could be exit, or quit, or bye, or logout, or ctrl-d, or maybe some other permutation. Imagine my horror, dear reader, when I sprang upon another exit command (or so I thought). The command is leave. But it's not exactly what you think. What leave does is simply send you a message reminding you to, well, log out (using exit / quit / logout / bye or ctrl-d) and get away. It sounds like the sort of command you need when you are working back, are about to head off to get a bite of dinner but you want to try just one more thing (which will only take 20 minutes), and end up ordering pizza at 1 am.
Here's the syntax:
Reminds you when you have to leave.
leave [ [ + ] hhmm ]
The leave command waits until the specified time and then reminds you that you have to leave. You are reminded at 5 minutes and at 1 minute before the actual time, again at that time, and at every minute thereafter. When you log off, the leave command exits just before it would have displayed the next message.
If you do not specify a time, the leave command prompts with When do you have to leave? A reply of newline causes the leave command to exit; otherwise, the reply is assumed to be a time. This form is suitable for inclusion in a .login or .profile file.
The leave command ignores interrupt, quit, and terminate operations. To clear the leave command, you should either log off or use the kill-9 command and provide the process ID.
|+||Specifies to set the alarm to go off in the indicated number of hours and minutes from the current time.|
|hhmm||Specifies a time of day in hours and minutes (based on a 12- or 24-hour clock) or, if preceded by the +, a set number of hours and minutes from the current time for the alarm to go off. All times are converted to a 12-hour clock and assumed to relate to the next 12 hours.|
To remind yourself to leave at 3:45, enter: