.logout for ksh?

Art Parmet artp at motbos.UUCP
Mon Oct 3 10:40:52 AEST 1988


In article <1594 at mcgp1.UUCP>, fst at mcgp1.UUCP (Skip Tavakkolian) writes:
> Is there a way to execute something on exit, in Korn shell?
> This would be like the ``csh'' ``.logout'' file.

In your /etc/profile file add the following entry:

# run special program at logoff time
trap "/local/bin/logoff" 0

The file /local/bin/logoff (or whatever you choose to run) will be run when the
parent shell of the user sesion dies.

Regards,
Art
-------------------------------- 

<< Unusual Disclaimer >>

Art Parmet - Northeast Area Eng Mgr @ Motorola Semiconductor, Woburn, Ma.
UUCP: {hplabs!motsj1, gatech!mcdchg, arla!oakhill, apps!oakhill}....!motbos!artp

Voice:      +1 617-932-9700     
DID:        +1 617-932-6049
UUCP:       +1 617-932-9191 
Fax:        +1 617-932-9100
POST:          RSXH20



More information about the Comp.unix.wizards mailing list