The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Pattern matching in file and then display 10 lines above every time namishtiwari Shell Programming and Scripting 30 04-13-2009 11:40 AM
RCS - Find difference between 2 different versions of a file kelangovan UNIX for Advanced & Expert Users 1 05-20-2008 08:47 AM
How to find number of lines in a file somesh_p Shell Programming and Scripting 2 12-19-2007 09:15 PM
find string, then get the next 3 lines in a file lyoncc Shell Programming and Scripting 8 11-07-2007 06:30 AM
Find lines greater than 80 characters in a file mrgubbala Shell Programming and Scripting 8 03-11-2007 12:51 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-29-2008
satyakam satyakam is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 2
Post To find the time difference between two lines of the same log file

Hello Friends,

I want to write a script for the following:

nlscux62:tibprod> grep "2008 Apr 30 01:" SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2.log | grep -i post | more
2008 Apr 30 01:01:23:928 GMT +2 SAPAdapter.SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2 Info [Adapter] AER3-000095 IDOC posted to
client SA_EHV_SPEED_SFC_IN_03InboundConnection4Client0 successfully tracking=#QrQ--5--G/SbkkvU67u6Ucw38-6gQ#
2008 Apr 30 01:01:23:958 GMT +2 SAPAdapter.SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2 Info [Adapter] AER3-000094 Posting IDOC t
o client SA_EHV_SPEED_SFC_IN_03InboundConnection8Client0 tracking=#I0Y--/--G/Sbl-rs68EEcJI5X-mrY#
2008 Apr 30 01:01:24:788 GMT +2 SAPAdapter.SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2 Info [Adapter] AER3-000095 IDOC posted to
client SA_EHV_SPEED_SFC_IN_03InboundConnection8Client0 successfully tracking=#I0Y--/--G/Sbl-rs68EEcJI5X-mrY#

On using the above command I can view the time difference between posting and posted. I want that the UNIX program to check for the time difference greater than 1 second. Please help me in this. I am absolutely new to the UNIX environment and know little regarding Shell programming. Hence I would like to have the full code.

Thanks
 

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 10:13 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