Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Builtin test and parsing of conditionals



On 9/4/13 1:39 PM, Bart Schaefer wrote:

> } So where does the
> } implicit comparison come from?  If -a were taken as high precedence you
> } might read it as
> } 
> } test -n ! -a n !
> } test -n ! -a n !
> 
> Presuming you mean -a -n there, this is exactly how the austin-group
> thread claims it should be interpreted, and is reportedly how ksh and
> bash and GNU /usr/bin/test all interpret it.

The rules, at least through four arguments, are well-defined.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128

-a and -o are binary primaries.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@xxxxxxxx    http://cnswww.cns.cwru.edu/~chet/



Messages sorted by: Reverse Date, Date, Thread, Author