The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > UNIX Desktop for Dummies Questions & Answers
Google UNIX.COM


UNIX Desktop for Dummies Questions & Answers Questions regarding GNOME, KDE, CDE, Open Office, etc go here. All UNIX and Linux Newbies Welcome !!

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 04: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 03:16 AM
create a shell script that calls another script and and an awk script magikminox Shell Programming and Scripting 0 06-25-2008 11:50 PM
help me in sending parameters from sqlplus script to unix shell script Hara Shell Programming and Scripting 2 01-29-2008 12:31 PM
Shell Script: want to insert values in database when update script runs ring Shell Programming and Scripting 1 10-25-2007 12:06 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 07-23-2008
Registered User
 

Join Date: Jul 2008
Posts: 15
I need a script

Hello people i`m back i`m from argentina , i`m trying to do a script that list the sulog of the last month (actual month 07 i need 06), the complicated part is that i need that but in here

-set +A MESES 0 Dec Jan Feb Mar Apr May Jun Jul Ago Sep Oct Nov
Mes=${MESES[`date +%m`]}

last -a|nawk -v mes="$Mes" '
$4 ~ mes {print $0;flag=1}
/system boot/ && $5 ~ mes {print $0;flag=1}
$4!~ mes && (/system boot/ && $5 !~ mes) {if(flag==1) exit;}
'
this program print the user that log on the computer (last) of the last month, my boss said something about convert the motnh of a number but i am very lost any ideas? thank for your help if someone come to argentina i invite the dinner.
Reply With Quote
Forum Sponsor
  #2  
Old 07-24-2008
Moderator
 

Join Date: Feb 2007
Posts: 2,331
What should be the expected output?
Reply With Quote
  #3  
Old 07-24-2008
Registered User
 

Join Date: Jul 2008
Posts: 15
Yes the out put must be the last of the last mointh and the su of the last month. Thank you franklin
Reply With Quote
  #4  
Old 07-24-2008
Moderator
 

Join Date: Feb 2007
Posts: 2,331
Post a sample of your output.
How can we know what your boss expect if you don't?
Reply With Quote
  #5  
Old 07-24-2008
Registered User
 

Join Date: Jul 2008
Posts: 15
This is the last of the last month
root pts/2 Wed Jun 20 17:25 - 17:25 (00:00)
root pts/3 Wed Jun 20 16:28 - 17:00 (00:31)
root ftp Wed Jun 20 15:59 - 16:11 (00:12)
root pts/3 Wed Jun 20 15:54 - 16:10 (00:16)
root pts/2 Wed Jun 20 15:44 - 16:31 (00:47)
root pts/2 Wed Jun 20 15:33 - 15:37 (00:04)
root console Tue Jun 19 14:48 - 14:49 (00:01)
And this is the only su of the last month
SU 06/24 16:13 + console root-root

this is want i need

Take it easy with me if you don`t wanna help me , i erase my thread.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 08:30 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