.logout for ksh?

David Connet connet at castor.usc.edu
Tue Oct 4 01:56:09 AEST 1988


In article <415 at motbos.UUCP> artp at motbos.UUCP (Art Parmet) writes:
>In your /etc/profile file add the following entry:
># run special program at logoff time
>trap "/local/bin/logoff" 0
>
>The file /local/bin/logoff (or whatever you choose to run) will be run when the
>parent shell of the user sesion dies.
>
>Regards,
>Art

Ummm, you had better add an exit in the trap, or after executing
/local/bin/logoff, you get your prompt back.

This is what I do:
	trap "logout;clear;exit" 0 3

logout is a shell script in my $HOME/bin that checks the existence
of $HOME/.logout.  It then dots that file.

Dave Connet



More information about the Comp.unix.wizards mailing list