notes/ubuntu/scan.sh

12 lines
170 B
Bash
Raw Normal View History

2019-12-29 20:12:09 -05:00
#!/bin/bash
is_alive_ping()
{
ping -c 1 $1 > /dev/null
[ $? -eq 0 ] && echo Node with IP: $i is up.
}
for i in 192.168.1.{1..255}
do
is_alive_ping $i & disown
done