#!/bin/bash for i in `seq 1 254` do ping -c 1 192.168.192.$i > /dev/null if [ $? -eq 0 ];then echo "ping 192.168.192.$i成功" else echo "ping 192.168.192.$i失败" >> /root/a.txt fi done
posted on 2019-09-27 11:23 快乐的人啊 阅读(195) 评论(1) 编辑 收藏 举报