Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!cs.utexas.edu!sm.unisys.com!oberon!nunki.usc.edu!castor.usc.edu!connet From: connet@castor.usc.edu (David Connet) Newsgroups: comp.unix.wizards Subject: Re: .logout for ksh? Keywords: .logout, KSH, help!!! Message-ID: <1529@nunki.usc.edu> Date: 3 Oct 88 15:56:09 GMT References: <1594@mcgp1.UUCP> <415@motbos.UUCP> Sender: news@nunki.usc.edu Reply-To: connet@castor.usc.edu (David Connet) Organization: University of Southern California, Los Angeles, CA Lines: 21 In article <415@motbos.UUCP> artp@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