echo "What is the IP Address?:"; read ip while [ "$nick" == "info" ] do echo $nfo_ip echo " " echo "What is the IP Address?:"; read ip ipchk=`ifconfig 2>&1 | grep inet | grep -v inet6 | awk '{print $2}' | grep "$ip"` while [ "$ipchk" != "$ip" -a "$ip" != "info" ] do echo "Invalid Ip" echo " " printf "What is the IP Address?:" read ip ipchk=`ifconfig 2>&1 | grep inet | grep -v inet6 | awk '{print $2}' | grep "$ip"` done done