The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > AIX
.
google unix.com



AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
to write a script to compare the file size in the current directory and previous dir tweety Shell Programming and Scripting 5 02-10-2009 03:24 AM
How to compare the mtime of a file with the current time? Krsh Shell Programming and Scripting 2 01-19-2009 03:02 AM
Perl: Extracting date from file name and comparing with current date MKNENI Shell Programming and Scripting 4 03-26-2008 04:01 PM
get a file date/timestamp alex31 UNIX for Dummies Questions & Answers 3 12-22-2005 10:06 AM
How to compare prev day file to current day file Smurtzy Shell Programming and Scripting 1 12-05-2001 07:33 PM

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 05-25-2009
achu achu is offline
Registered User
  
 

Join Date: May 2009
Posts: 2
how to grep and compare timestamp in a file with the current date

I want to read a log file from a particular location.In the logfile , lines contains timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file format.Please help as its urgent.
[4/30/09 4:03:51:100 EST] 00000070 AdminServiceI W ADMN0037W:
[4/30/09 4:04:12:064 EST] 00000721 InvalidateByI E DYNA0052E:
[4/30/09 4:04:47:335 EST] 000000e1 LeaseAlarm I SCHD0134I:
[4/30/09 4:05:21:015 EST] 00000070 AdminServiceI W ADMN0037W:
[4/30/09 4:06:51:079 EST] 00000070 AdminServiceI W ADMN0037W:
  #2 (permalink)  
Old 05-25-2009
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,342
No duplicate or cross-posting, please read the rules.

Continue here:

how to grep and compare timestamp in a file with the current date

Thread closed.
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:24 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