Path: utzoo!utgpu!water!watmath!clyde!att!rutgers!gatech!uflorida!haven!ncifcrf!nlm-mcs!adm!smoke!gwyn From: gwyn@smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards Subject: Re: .logout for ksh? Keywords: .logout, KSH Message-ID: <8620@smoke.ARPA> Date: 3 Oct 88 08:20:07 GMT References: <1594@mcgp1.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <1594@mcgp1.UUCP> fst@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