#!/bin/bash

read -p "class network address:" network

for i in {100..130}; do

if ping -c 1 -w 1 $network.$i &> /dev/null; then

echo -e "\033[32m$network.$i\033[0m is up"

else

echo -e "\033[31m$network.$i\033[0m is down"

fi

done