daffner@ecn.purdue.edu (Lawrence R. Daffner) (12/10/90)
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 )
mende@athos.rutgers.edu (Bob Mende Pie) (12/11/90)
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? Bash will execute the contents of ~/.bash_logout. Put this in your home directory and enjoy. -- /Bob... {...}!rutgers!mende mende@cs.rutgers.edu mende@zodiac.bitnet
greywolf@unisoft.UUCP (The Grey Wolf) (12/13/90)
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