//Tips tagged ping
Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
On my home network I often need to know which IP addresses have devices connected to them. The following one-liner will scan a given range and let you know whether each IP can be pinged.

for IP in 192.168.1.{1..10}; do if ping $IP -c 1 > /dev/null; then echo $IP alive; else echo $IP dead; fi; done

View Comments »

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit