Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!hplabs!hpfcdc!hpfcdq!benji From: benji@hpfcdq.HP.COM (Jeff Benjamin) Newsgroups: comp.unix.questions Subject: Re: .suffile/.logout in ksh Message-ID: <8170002@hpfcdq.HP.COM> Date: 26 May 89 16:10:50 GMT References: <4404@ucdavis.ucdavis.edu> Organization: Hewlett-Packard - Fort Collins, CO Lines: 25 > Does anyone know how to get a ".suffile" file to work for ksh? I assume you mean the equivalent of csh .logout, to do something when you exit a session? Ksh does not do anything like this for you automatically; you have to set up your .profile to trap the signal generated on a logout and then execute a command. Syntax for a ksh "trap" is: trap [arg] [sig]..., where "arg is a command read and executed when the shell receives signal(s) sig." See the ksh man page for more info. The line to do this in my .profile looks like: trap $HOME/.logout 0 This says "when you receive signal 0 (logout), execute $HOME/.logout". So my .logout file is executed when I logout from ksh as well as from csh. ----- Jeff Benjamin {ucbvax,hplabs}!hpfcla!benji Graphics Technology Division benji%hpfcla@hplabs.HP.COM Hewlett Packard Co. Fort Collins, Colorado