Hi,
I am a new learner. I need a simple scripts that compute the average ping time for hosts, and the average number of hosts that respond to pings during a traceroute.
I have finished the ping part but I confused how to start the traceroute part
Code:
#!/bin/bash
#!/bin/sh
txt=$*
count=0;
for host in $txt; do
echo $host
echo $( ping -c 3 $host | grep avg | sed 's@.*=@ rrt ave =@' | sed -r 's@ = [^/]+/([^/]+).*@= \1 ms@')
done;
Can anyone help me where I need to start?
Thanks,
icy