cat ipcalc.sh
#!/bin/bash
IP=$1
if [ -z $IP ]
then
echo -e “\e[31;42m sh ipcalc.sh IP \e[0m
exit
fi
while read MASK
do
min=`/usr/bin/ipcalc $MASK|awk '/HostMin:/{print $2}'`
max=`/usr/bin/ipcalc $MASK|awk '/HostMax:/{print $2}'`
MIN=`echo $min|awk -F