The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
memory calculation rrlog Linux 0 08-08-2007 06:18 PM
MD5 hash calculation zedex High Level Programming 4 02-23-2007 11:37 PM
awk calculation kekanap Shell Programming and Scripting 4 11-17-2006 04:39 AM
time calculation liux99 UNIX for Advanced & Expert Users 2 08-18-2005 07:33 PM
Math calculation help sickboy Shell Programming and Scripting 4 06-11-2005 10:22 AM

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

Join Date: Feb 2008
Posts: 38
Reattemps Calculation using awk

Dear All

How are you

I have files which look like this :

20080406_12:43:55.779 ISC Sprint- 39 21624032999 218925866728
20080406_12:44:07.811 ISC Sprint- 20 21620241815 218927736810
20080406_12:44:00.485 ISC Sprint- 50 21621910404 218913568053
20080406_12:41:33.779 ISC Sprint- 17 21624247736 218926103389
20080406_12:43:55.038 ISC Sprint- 27 21622534158 218913975171
20080406_12:44:01.928 ISC Sprint- 6 21621941577 218925544285
20080406_12:44:11.283 ISC Sprint- 12 21624307314 218913794921
20080406_12:40:40.166 ISC Sprint- 52 21621603606 218913823593
20080406_12:43:38.822 ISC Sprint- 62 21620348813 218913580432
20080406_12:44:04.168 ISC Sprint- 36 21620415413 218913790347
20080406_12:44:13.982 ISC Sprint- 6 21623171785 218913208380
20080406_12:43:16.016 ISC Sprint- 45 21622691719 218926644360
20080406_12:43:57.288 ISC Sprint- 38 21621848768 218913735624
20080406_12:44:22.698 ISC Sprint- 54 21624307314 218913794921
20080406_12:44:16.119 ISC Sprint- 52 21621910404 218913568053
20080406_12:44:21.540 ISC Sprint- 6 21623165673 218925668272
20080406_12:43:40.990 ISC Sprint- 61 21620150305 218928692370
20080406_12:42:41.258 ISC Sprint- 9 21624121551 218912139338
20080406_12:40:40.529 ISC Sprint- 14 21620616935 218913209052
20080406_12:44:32.169 ISC Sprint- 9 21621989508 218928051629
20080406_12:44:27.921 ISC Sprint- 20 21623692276 218923637292
20080406_12:44:27.440 ISC Sprint- 6 21621300259 218913614624
20080406_12:44:34.883 ISC Sprint- 20 21624307314 218913794921
20080406_12:43:51.168 ISC Sprint- 34 21621539079 218927152496
20080406_12:43:51.542 ISC Sprint- 56 21623513178 218927428474
20080406_12:43:51.174 ISC Sprint- 29 21623072448 218926735947
20080406_12:44:29.696 ISC Sprint- 61 21624032999 218925866728

I want a script which takes these lines and calculates the Repeated times of $5 and $6 , for example in this sample you will find that the first line and last line are identical in $5 and $6 also the time stamp difference is small , so the script should check two conditions:
[list] Check that $5 and $6 for the two lines is identical as in the example[list] Calculate the time stamp difference in seconds (Ignore ms), it must be less than or equal 2 minutes.

If the two conditions is ok then the complete line ($0) of the two attempts is printed, speed should be normal as the number of calls is large.

Note : I am using Solaris 8

Thanks and best regards
zanetti
Reply With Quote
Google The UNIX and Linux Forums
Forum Sponsor
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




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