Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!ucsd!ucbvax!unisoft!greywolf From: greywolf@unisoft.UUCP (The Grey Wolf) Newsgroups: comp.unix.shell Subject: Re: Bash and .logout : Are they compatible? Message-ID: <3273@unisoft.UUCP> Date: 13 Dec 90 02:08:03 GMT References: <9012092055.AA04975@gn.ecn.purdue.edu> Reply-To: greywolf@unisoft.UUCP (The Grey Wolf) Organization: Foo Bar and Grill Lines: 30 In article <9012092055.AA04975@gn.ecn.purdue.edu> daffner@ecn.purdue.edu (Lawrence R. Daffner) writes: > > Does anyone know if there is a way to force bash to source the .logout >file on exit from the login shell. If it is supposed to do so, any clue why >it doesn't. I would prefer to still be able to use ^D to logout.I could alias >logout to ". .logout;\logout", but would ^D use this alias, or just log me out, >no questions asked? > > > Any help appreciated, > Larry ( daffner@ecn.purdue.edu ) Try inserting the following into your .profile: export LOGIN if [ "$LOGIN" = "" ] ; then LOGIN="logged in" trap "echo logout ; . $HOME/.bash_logout" 0 fi This seems the most likely way to do it (I assume that bash is GNU's version of the Bourne shell with various non-proprietary doodads inserted). If my assumption is wrong, flames to my mailbox, please. -- On the 'Net: Why are more and more fourth-level wizard(-wannabe)s trying to invoke ninth-level magic, instead of taking the time to climb the other (quite essential) thirteen levels so they can do this properly? ...!{ucbvax,acad,uunet,amdahl,pyramid}!unisoft!greywolf