bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bash -f Test Operator - Not working as expected


From: Eduardo Bustamante
Subject: Re: Bash -f Test Operator - Not working as expected
Date: Tue, 2 May 2017 08:07:05 -0500

On Tue, May 2, 2017 at 7:13 AM, Greg Wooledge <wooledg@eeg.ccf.org> wrote:
[...]
> would be safe.  Your test command has 6 arguments, for which "the results
> are unspecified".
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html

Hm. That section of the standard refers to "The algorithm for
determining the precedence of the operators and the return value that
shall be generated is based on the number of arguments presented to
test.". I don't understand why the standard would introduce the -a /
-o primitives, only to make their use unspecified a few paragraphs
later.

At this point I guess I'd also go with your suggestion. After
re-reading the test specification, I couldn't determine what the
precedence of the not operator is in relationship to the and/or
operators.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]