bug-bash
[Top][All Lists]
Advanced

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

Re: [BUG] false positive: [ ! -o optname ]


From: Martijn Dekker
Subject: Re: [BUG] false positive: [ ! -o optname ]
Date: Sun, 25 Sep 2016 23:05:30 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

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 ]; echo $?
> 0

Which also makes sense now that I think about it, since -a means "and"
so it tests for the non-emptiness of both strings.

Bug report withdrawn.

Sorry for the noise,

- M.




reply via email to

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