Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!tuvie!iiasa!wnp From: wnp@iiasa.ac.at (Wolf PAUL ) Newsgroups: comp.unix.shell Subject: Re: .logout functionality using ksh Message-ID: <991@iiasa.UUCP> Date: 14 Dec 90 06:35:54 GMT References: <1990Dec11.202750.2435@wpi.WPI.EDU> <175@raysnec.UUCP> Sender: news@iiasa.AT Reply-To: wnp%iiasa@relay.eu.net (Wolf PAUL ) Organization: International Institute for Applied Systems Analysis, Laxenburg, Austria Lines: 26 In article <175@raysnec.UUCP> shwake@raysnec.UUCP (Ray Shwake) writes: )fenn@wpi.WPI.EDU (Brian Fennell) writes: ) )>There was a question about .logout for bash... any idea how to fudge )>it with ksh? ) ) The approach I've used successfully involves trapping the logout )signal (signal 0). Example: ) ) trap 'tput clear; exit' EXIT ) ) I use this under SCO and ISC UNIX, among others. On some systems, )the EXIT reference is not recognized, so use 0 instead. Or to simulate .logout completely, do something like trap ". $HOME/.logout ; exit" EXIT which will execute the contents of .logout on exit from the shell. This will also work with the System V.2 Bourne shell, since it too has the trap command. -- W.N.Paul, Int. Institute f. Applied Systems Analysis, A-2361 Laxenburg--Austria PHONE: +43-2236-71521-465 INTERNET: wnp%iiasa@relay.eu.net FAX: +43-2236-71313 UUCP: uunet!iiasa!wnp HOME: +43-2236-618514 BITNET: tuvie!iiasa!wnp@awiuni01.BITNET