發新話題
打印

Scan IP Address

Scan IP Address

#!/bin/sh
# set -x
NUM=1

while [ $NUM -lt 256  ];do
    ping -q -c 1 192.168.0.$NUM > /dev/null
    RESULT=$(echo $?)
    if [ $RESULT -eq 0 ]; then
        printf 192.168.0.$NUM"\n"
    fi
    NUM=$(expr $NUM + 1)
done

TOP

發新話題