All pastes #729549 Raw Edit

Untitled

public text v1 · immutable
·published 2007-10-08 02:34 UTC
rendered paste body
#!/bin/sh
clear
printf "IP Address?: "
read u_ip

ipchk=`ifconfig | grep "$u_ip"`

while [ "$u_ip" == "" && "$ipchk" == ""]
  do
        echo "Invalid Ip"
        printf "IP Address?: "
        read ip

  done

if [ $ipchk != "" ] ; then

        ip="$u_ip"

        echo "IP: $ip"
fi

### results ###

# get-test
IP Address?: 54
[: missing ]
[: inet: unexpected operator