Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ip_address="0.0.0.0"
- if [ "$1" != "" ]
- then
- ip_address="$1"
- else
- read -p "IP: " ip_address
- fi
- base=$(echo "$ip_address" | cut -d . -f1-3)
- for i in {1..135}
- do
- if ping -c 1 -W 1 "$base.$i" &> /dev/null
- then
- echo "$base.$i";
- else
- echo "No response from $base.$i"
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement