]> git.llucax.com Git - z.facultad/75.43/tp2.git/blob - pingall
* Tablas de ruteo teoricas listas. Plz no editar ni commitear que sigo haciendo...
[z.facultad/75.43/tp2.git] / pingall
1 #!/bin/sh
2 hosts="www alf3 friends65 csi193 action1 action2 brigada34 brigada33 seinfeld2 trfs194 hosta hostb hostc trfs193 swat37 swat38 heman130 dukes196 dukes193 dukes194 simpsons2 simpsons1 telnet simpsons129 heman130 ftp seinfeld1"
3
4 for host in $hosts
5 do
6         echo -n "Pingueando $host: "
7         res=`ping -W1 -c1 $host | grep from`
8         if [ -z "$res" ]
9         then
10                 echo 'ERROR!'
11         else
12                 echo "$res"
13         fi
14 done