On Wed, Sep 04, 2013 at 01:20:00PM +1000, Herbert Xu wrote:
>  
> > "test ! -o !" is a three-argument test, where $2 (-o) is a binary
> > primary, so it is the binary test of $1 and $3, and the end result is an
> > exit status of 0.  Bash and ksh get it right, dash fails.
> 
> Both zsh and posh do it like dash:
> 
> $ zsh -c 'test ! -o !'; echo $?
> zsh:test:1: too many arguments
> 1
> $ zsh -c 'test ! = !'; echo $?
> 0
> $

Another case in point is 'test ! = -o a', here bash differs with
every other shell installed on my system, which all return 0, just
like dash.

Cheers,
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to