The C shell has a setup file named
Commands in .logout
are run when you log out.
The Bourne and Korn shells don't have a logout file, though.
Here's how to make one:
In your .profile
file, add the line:
trap '. $HOME/.sh_logout; exit' 0
(Some systems may need
Make a file in your home directory named .sh_logout
Put in the commands you want to be run when you log out.
if [ -f $HOME/todo.tomorrow ]
echo "=========== STUFF TO DO TOMORROW: ============"
will read the .sh_logout
file when the shell exits.