@llplmlyd
2018-10-07T07:21:09.000000Z
字数 287
阅读 1200
Shell
shell脚本,判断192.168.150.0/24网络中 在线ip有哪些
并发ping方案:
#!bin/bashCMD="ping -W 2 -c 2"ip="192.168.150."for n in $(seq 254)do{$CMD $ip$n &> /dev/null[ $? -eq 0 ] && echo "$ip$n is ok"}& #z这里是并发检测done
shell脚本
#!bin/bashCMD="nmap -sP"ip="192.168.150.0/24"$CMD $ip|awk '/Nmap scan report for/ {print $NF}'
