The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > SUN Solaris
Google UNIX.COM


SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
What happens when user logout? yhacks Linux 1 05-15-2008 11:20 PM
.logout help 2dumb Shell Programming and Scripting 3 05-10-2007 08:49 AM
logout zam UNIX for Dummies Questions & Answers 2 12-28-2006 04:23 PM
How do you logout from a session? Heron Linux 4 04-25-2005 10:11 AM
logout command raguramtgr UNIX for Dummies Questions & Answers 6 04-09-2004 12:36 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 12-23-2007
Registered User
 

Join Date: Feb 2007
Posts: 36
.logout

I want to execute script while exiting a session, to gather session details. How to implement this in Solaris 10
Reply With Quote
Forum Sponsor
  #2  
Old 12-23-2007
Registered User
 

Join Date: Dec 2007
Location: Paris
Posts: 465
This is not that much related to the O/S but really to the shell you use.
Reply With Quote
  #3  
Old 12-23-2007
blowtorch's Avatar
Supporter
 
Join Date: Dec 2004
Location: Singapore
Posts: 2,326
Like jlliagre said, it depends on the shell. As far as I know, csh provides you with .logout that runs commands while logging out of a session, while bash provides you with .bash_logout. Ksh and sh do not provide this functionality.
Reply With Quote
  #4  
Old 12-24-2007
Registered User
 

Join Date: Dec 2007
Location: Paris
Posts: 465
Actually, with sh and ksh,
Code:
trap "$HOME/.logout EXIT"
can be use for the very same purpose.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:25 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0