The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Passing the values to the secondary script when it invoked by primary script venu_eie UNIX for Advanced & Expert Users 2 07-03-2008 08:10 AM
Passing the values to the secondary script when it invoked by primary script venu_eie Shell Programming and Scripting 1 07-03-2008 07:16 AM
create a shell script that calls another script and and an awk script magikminox Shell Programming and Scripting 0 06-26-2008 03:50 AM
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 03:31 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 04:06 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-23-2008
ggayathri ggayathri is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 18
Need help with a script

Hi,

I would like to know how to implement a script which would trigger off a report that would be sent when a particular user logs off.
Sending an email, I think I can implement.
However, I am not able to figure out how to determine if a particular user id logs off. Can anyone please help me.

Gayathri
  #2 (permalink)  
Old 10-23-2008
vimes vimes is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 46
Depending on their shell, you could add the command to one of the following files in their homedir:


Code:
$HOME/.logout
$HOME/.bash_logout

You could modify the permissions of those files if you don't want them to be able to edit it.
  #3 (permalink)  
Old 10-23-2008
ggayathri ggayathri is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 18
I do not see any such file when I do a ls -a
Can I create a new file like that, and will that work, when the user id logs off.


Gayathri
  #4 (permalink)  
Old 10-23-2008
tsurko tsurko is offline
Registered User
  
 

Join Date: Jun 2007
Location: Sofia, Bulgaria
Posts: 35
Yes, if the file doesn't exist you can create it and call your script from there.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:49 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0