Unix/Linux Go Back    

UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

Script help with awk/ping

UNIX and Linux Applications

awk, ping command, script, unix

Thread Tools Search this Thread Display Modes
Old Unix and Linux 12-07-2015   -   Original Discussion by 5sku5
5sku5's Unix or Linux Image
5sku5 5sku5 is offline
Registered User
Join Date: Dec 2015
Last Activity: 7 December 2015, 12:20 AM EST
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Script help with awk/ping

I need to ping a host website ...like facebook.com and out the seconds of delay for 5 websites ..I need help writing a script that will print the bold

PING facebook.com ( 56(84) bytes of data.
64 bytes from edge-star-mini-shv-13-atn1.facebook.com ( icmp_req=1 ttl=76 time=74.0 ms

--- facebook.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 74.087/74.087/74.087/0.000 ms
PING pbs.org ( 56(84) bytes of data.

for websites in `cat hosts`

ping -c 1 $websites >> pingwebsites

echo "Please wait. Waiting to find the host with the highest delay !!!--->"

 awk ' { print $2,  $8 } ' pingwebsites >pingtimes

Sponsored Links
Old Unix and Linux 12-07-2015   -   Original Discussion by 5sku5
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is online now Forum Staff  
Join Date: Jul 2012
Last Activity: 22 January 2018, 1:22 PM EST
Location: San Jose, CA, USA
Posts: 10,936
Thanks: 611
Thanked 3,822 Times in 3,266 Posts
Moderator's Comments:
Script help with awk/ping This thread is a duplicate of Pinging Host.

Post any responses you may have on this topic in the other thread.

This thread is closed.
Sponsored Links

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need bash script to ping the servers and rename the output file each time the script is ran madhudeva Shell Programming and Scripting 4 07-13-2012 05:24 AM
Animation Ping on Solaris Like Cisco Ping gokcell Shell Programming and Scripting 1 12-04-2011 05:12 AM
Router ping log extract data from it Awk/Sed/grep jkmistry Shell Programming and Scripting 2 09-16-2011 05:26 AM
Help with Ping Script and AWK stacky69 Shell Programming and Scripting 3 11-04-2010 04:42 PM
Using AWK for ping and print.. hutch770 UNIX for Dummies Questions & Answers 5 09-29-2005 08:49 PM

All times are GMT -4. The time now is 02:23 PM.