获取局域网内server username ip
#!/system/bin/sh
nbtscan 192.168.1.1-254 |sed '/^IP/d'|sed '/^-/d'|sed '/^D/d'|sed '/^ /d'|sed '/^[ \t]*$/d'|awk '{print $2,"(",$1,")"}' > used.tmp
cat used.tmp | sed 's/ //g' > usedIpAddress
rm used.tmp
阅读(957) | 评论(0) | 转发(0) |