Subject: Re: bin/35184: ksh does not handle '-o' or '-a' conditionals correctly if comparing strings containing hyphens
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org,>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 12/04/2006 22:05:04
The following reply was made to PR bin/35184; it has been noted by GNATS.
From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/35184: ksh does not handle '-o' or '-a' conditionals correctly if comparing strings containing hyphens
Date: Mon, 4 Dec 2006 22:01:47 +0000
On Mon, Dec 04, 2006 at 02:00:01PM +0000, john.horne@plymouth.ac.uk wrote:
> Under ksh the following conditional test fails:
>
> $ test "-n" = "-n" -o "-e" = "-e" && echo ok
> ksh: test: -n: unexpected operator/operand
This is valid (by posix) see:
http://www.opengroup.org/onlinepubs/009695399/utilities/test.html
>4 arguments:
The results are unspecified.
David
--
David Laight: david@l8s.co.uk