#!/bin/bash
RESPONSE=
if [ -f ./ips.txt ]; then
rm -rf ./ips.txt
fi
while [ -z "$RESPONSE" ];
do
echo "Please enter an IP Address in the format XXX.XXX.XXX./c"
echo "The program will create a file called ips.txt which will"
echo "include a C-Class subnet of IPs.  ex 114.23.11."
read RESPONSE
done
x=1
while [ $x -le 255 ] 
do
echo "$RESPONSE$x" >> ./ips.txt
x=`echo "$x + 1" | bc`
done
echo "File sucessfully written."