PingLoop.sh
I've run into a situation where I want to keep my eye on specific laptops when they come online during a pentest each day. I have a big list of files inhosts.txt
and anytime I want to see which ones are online:
Quick ping loop through a text file full of hosts
while read -r host; do ping -c 2 -i 0.2 -W 1 "$host"; done < hosts.txt