sh script ?

John Levine johnl at iecc.com
Fri Jan 25 01:10:24 UTC 2013


>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.





More information about the freebsd-questions mailing list