On Thu, Jan 24, 2013 at 1:07 PM, Fbsd8 <fb...@a1poweruser.com> wrote: > 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?
The -eq operator is used to compare integers. When comparing strings, use the == operator. -- Take care Rick Miller _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"