I want to write a script, that would keep checking if any of the devices in network, that should be online all day long, are really online. I tried to use ping, but
for i in `cat Hostlist` do ping -c1 -w2 $i | grep "PING" | awk '{print $2,$3}' done