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
How To Calculate krishna_sicsr Shell Programming and Scripting 3 03-21-2009 01:49 PM
calculate 13 months ago andrea_mussap Shell Programming and Scripting 3 11-16-2007 03:18 PM
how to calculate CPU time under HP-UX limame HP-UX 1 06-18-2007 05:28 PM
How to calculate with awk whatisthis Shell Programming and Scripting 4 11-09-2005 12:39 PM
How to calculate a sum of certain records? sickboy Shell Programming and Scripting 10 06-10-2005 11:43 AM

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

Join Date: May 2008
Posts: 8
How to calculate the maximum value & min value

I have a file as like below,

Code:
10:20:30.45 	START 	10.20.30.40
10:20:31.46 	HELLO 	10.20.30.40
10:20:32.46	START 	10.20.30.41
10:20:33.44	END   	10.20.30.40
10:20:35.44 	HELLO 	10.20.30.41
10:20:36.56 	HELLO 	10.20.30.41
10:20:37.78 	HELLO 	10.20.30.41
10:20:38.99 	START 	10.20.30.40
10:20:39.11 	HELLO 	10.20.30.41
10:20:40.23 	HELLO 	10.20.30.40
10:20:41.23 	END 	10.20.30.41
10:20:45.45 	HELLO 	10.20.30.40
10:20:47.66 	HELLO 	10.20.30.40
10:20:50.32 	END 	10.20.30.40
I need the output like this,
Code:
No. Of Hello for 10:20:30:40 - 1
No. Of Hello for 10:20:30:41 - 4
No. Of Hello for 10:20:30:40 - 3
Also,
Code:
END - START for IP 10:20:30:40 -(10:20:33.44-10:20:30.45)=2.99
END - START for IP 10:20:30:41 -(10:20:41.23-10:20:32.46)=8.77
END - START for IP 10:20:30:40 -(10:20:50.32-10:20:38.99)=11.33
Note: Same IP will be get repeated, but i need a seperate "count" & "Time taken" of HELLO for the same IP at different session...Please help me out to solve this

Thanks in advance

Last edited by Yogesh Sawant; 05-29-2008 at 12:59 AM.. Reason: added code tags
  #2 (permalink)  
Old 05-29-2008
gobinath gobinath is offline
Registered User
  
 

Join Date: May 2008
Posts: 8
Shell script to manipulate a message count for the same IP @ diff session

Changing the title
Sponsored Links
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 11:40 PM.


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