Computing.Net > Forums > Solaris > sell script

sell script

Reply to Message Icon

Original Message
Name: Hugo
Date: April 30, 2008 at 10:32:10 Pacific
Subject: sell script
OS: Sol 9
CPU/Ram: 4GB
Model/Manufacturer: v240
Comment:

Hi,

I've written a one line script to consolidate ping stats for each device being pinged from a list of 30 devices. I am using a for-do loop and extracting and formatting the values. But I'm having problems extracting just the average value:

My output so far looks like this:

MyCity to device.domain.com (10.10.10.12): 04-30-08 13:05:00 min/avg/max = 103/106/113

I need it to show only the average value, like this:
MyCity to device.domain.com (10.10.10.12): 04-30-08 13:05:00 avg = 106

How can I accomplist this since the value average is not always 3 characters? I tried using nawk and sed, but no luck yet extracting just the average for each ping result.

Thanks


Report Offensive Message For Removal








Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: sell script

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 4 Days.
Discuss in The Lounge