On Fri, Feb 14, 2003 at 02:11:37AM +0000, Dr. David Kirkby wrote: > "test: ==: unexpected operator" on a Sun running NetBSD 1.6
"==" is indeed unexpected :-) Bourne shell doesn't support it; I don't believe ksh does either. It looks like a bash extension, in which shell it does pattern matching. (Even the standalone /usr/bin/test on my Mandrake 7.2 box doesn't support "=="; only bash's built-in "test" does.) Use "=" or "!=" for string comparison; for numeric comparison the operators are: -eq -ne -gt -ge -lt -le > The section below between the two rows of stars works fine on a Sun > workstation running Solaris 9 (tcsh shell), a Sun workstation running > Debian Linux (bash shell), a PC running Redhat 7.3 Linux (tcsh shell), I bet the Solaris box has bash installed -- and as /bin/sh too! Linux systems typically have bash as /bin/sh, so the script's success there is unsurprising. By "(tcsh shell)" I presume you mean it's your login shell. That's irrelevent; what matters is the one named in the script's "#!" line. -- | | /\ |-_|/ > Eric Siegerman, Toronto, Ont. [EMAIL PROTECTED] | | / A distributed system is one on which I cannot get any work done, because a machine I have never heard of has crashed. - Leslie Lamport