Ping a varios hosts.

d
Visto en The Linux Tips
#!/bin/bash
for i in 192.168.0.{1..10}
do
   ping -c 1 -t 1 "$i" >/dev/null 2>&1 &&
   echo "Ping Status of $i : Success" ||
   echo "Ping Status of $i : Failed"
done

0 comentarios: