Bash and .logout : Are they compatible?

The Grey Wolf greywolf at unisoft.UUCP
Thu Dec 13 13:08:03 AEST 1990


In article <9012092055.AA04975 at gn.ecn.purdue.edu> daffner at 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 at 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



More information about the Comp.unix.shell mailing list