Path: utzoo!utgpu!water!watmath!clyde!att!ucbvax!hplabs!motsj1!motbos!artp From: artp@motbos.UUCP (Art Parmet) Newsgroups: comp.unix.wizards Subject: Re: .logout for ksh? Summary: How to run a special process at logoff time Keywords: .logout, KSH, help!!! Message-ID: <415@motbos.UUCP> Date: 3 Oct 88 00:40:52 GMT References: <1594@mcgp1.UUCP> Organization: Motorola Semiconductor Products, Woburn, Ma. Lines: 26 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. 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 -------------------------------- << Unusual Disclaimer >> Art Parmet - Northeast Area Eng Mgr @ Motorola Semiconductor, Woburn, Ma. UUCP: {hplabs!motsj1, gatech!mcdchg, arla!oakhill, apps!oakhill}....!motbos!artp Voice: +1 617-932-9700 DID: +1 617-932-6049 UUCP: +1 617-932-9191 Fax: +1 617-932-9100 POST: RSXH20