On 9/25/16 5:57 PM, Martijn Dekker wrote:
> Op 25-09-16 om 22:40 schreef isabella parakiss:
>> On 9/25/16, Martijn Dekker wrote:
>>> The '!' operator in the legacy test/[ builtin does not invert the result
>>> of the -o operator. Consequently the command
>>>
>>> [ ! -o
Op 25-09-16 om 22:57 schreef Martijn Dekker:
> And indeed your interpretation does not apply to something like
> "[ ! -e /tmp ]":
>
> $ [ -e /tmp ]; echo $?
> 0
> $ [ ! -e /tmp ]; echo $?
> 1
>
> However, the supposed synonym -a acts differently:
>
> $ [ -a /tmp ]; echo $?
> 0
> $ [ ! -a /tmp
Op 25-09-16 om 22:40 schreef isabella parakiss:
> On 9/25/16, Martijn Dekker wrote:
>> The '!' operator in the legacy test/[ builtin does not invert the result
>> of the -o operator. Consequently the command
>>
>> [ ! -o noclobber ]
>>
>> amounts to a no-op, always
On 9/25/16, Martijn Dekker wrote:
> The '!' operator in the legacy test/[ builtin does not invert the result
> of the -o operator. Consequently the command
>
> [ ! -o noclobber ]
>
> amounts to a no-op, always returning exit status 0.
>
> Proof:
>
> $ set -o noclobber && [
The '!' operator in the legacy test/[ builtin does not invert the result
of the -o operator. Consequently the command
[ ! -o noclobber ]
amounts to a no-op, always returning exit status 0.
Proof:
$ set -o noclobber && [ -o noclobber ] && [ ! -o noclobber ] && echo bug
bug