.logout for ksh?

Doug Gwyn gwyn at smoke.ARPA
Mon Oct 3 18:20:07 AEST 1988


In article <1594 at mcgp1.UUCP> fst at mcgp1.UUCP (Skip Tavakkolian) writes:
>Is there a way to execute something on exit, in Korn shell?
>This would be like the ``csh'' ``.logout'' file.

The following should work with any Bourne-compatible shell.
In your .profile, add:
	if [ -r $HOME/.logout ]
	then	trap ". $HOME/.logout" 0
	else	trap "exec echo 'logged out'" 0
	fi



More information about the Comp.unix.wizards mailing list