.logout functionality using ksh <was: A few questions>
Wolf PAUL
wnp at iiasa.ac.at
Fri Dec 14 17:35:54 AEST 1990
In article <175 at raysnec.UUCP> shwake at raysnec.UUCP (Ray Shwake) writes:
)fenn at 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 at relay.eu.net
FAX: +43-2236-71313 UUCP: uunet!iiasa!wnp
HOME: +43-2236-618514 BITNET: tuvie!iiasa!wnp at awiuni01.BITNET
More information about the Comp.unix.shell
mailing list