Skip site navigation (1)Skip section navigation (2)
Date:      25 Jan 2013 01:10:01 -0000
From:      "John Levine" <johnl@iecc.com>
To:        freebsd-questions@freebsd.org
Cc:        fbsd8@a1poweruser.com
Subject:   Re: sh script ?
Message-ID:  <20130125011001.4689.qmail@joyce.lan>
In-Reply-To: <5101786C.3070209@a1poweruser.com>

next in thread | previous in thread | raw e-mail | index | archive | help
>I get this message [: 10.0.10.21: bad number on this code
>
>    [ "${saved_ip}" -eq "${used_ip}" ] && echo "good match"
>
>Both variables have valid ip addresses in them.
>Why does it think the variable content is a number and not text?
>What am I doing wrong?

My guess would be that you didn't read the man page for the "test"
(sometimes spelled "[" ) command.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130125011001.4689.qmail>