vim ping.sh
#!/bin/bash
for I in {1..254};do
if ping -c1 -w2 192.168.0.$I &>/dev/null
then
echo "$I is on line"
else
echo "$I is offline"
fi
done
转载于:https://blog.51cto.com/fighter/462732
vim ping.sh
#!/bin/bash
for I in {1..254};do
if ping -c1 -w2 192.168.0.$I &>/dev/null
then
echo "$I is on line"
else
echo "$I is offline"
fi
done
转载于:https://blog.51cto.com/fighter/462732