bug-bash
[Top][All Lists]
Advanced

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

Re: -a broken, -e correct


From: Paul Jarc
Subject: Re: -a broken, -e correct
Date: Tue, 29 Jul 2003 14:49:26 -0400
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Ross Vandegrift <ross@willow.seitz.com> wrote:
> It looks like [ -a foo ] and [ ! -a foo ] both return true when foo is a
> file that exists.

-a is a binary operator as well as a unary operator.  [ A -a B ] is
true if A and B are both true.  A single string is true if it is
nonempty, so "!" and "foo" are both true.  You can get the effect you
want this way: ! [ -a foo ]


paul




reply via email to

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