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
for host in $txt; do
echo $( ping -c 3 $host | grep avg | sed 's@.*=@ rrt ave =@' | sed -r 's@ = [^/]+/([^/]+).*@= \1 ms@')
Can anyone help me where I need to start?