#!/bin/bash
myping(){
ping -c1 -w1 $1 &>/dev/null
num=$?
if [ $num -eq 0 ]
then
echo "$1 is up."
else
echo "$1 is down."
fi
}
for i in {1..25}
do
myping 192.168.254.$i
done
#!/bin/bash
myping(){
ping -c1 -w1 $1 &>/dev/null
num=$?
if [ $num -eq 0 ]
then
echo "$1 is up."
else
echo "$1 is down."
fi
}
for i in {1..25}
do
myping 192.168.254.$i
done
暂无评论
2023-11-25
2023-11-24
2023-11-19
2023-11-19
2023-11-13
2023-11-02
2023-11-02
2023-11-02
2023-11-02
2023-11-02
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23
2023-12-23