gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] bash scripting conditionals: "-a" vs "-e"


From: John A Meinel
Subject: Re: [Gnu-arch-users] bash scripting conditionals: "-a" vs "-e"
Date: Fri, 12 Nov 2004 15:06:30 -0600
User-agent: Mozilla Thunderbird 0.9 (Windows/20041103)

Zenaan Harkness wrote:
Matthias, can you confirm if this is a doco bug?


Well, both cygwin, redhat AS3 and redhat 9 only have -a as the && operator. They don't have the entry like you see for '-a file'.

John
=:->

[...]

Well that seems to be the functionality, but the docs tell otherwise,
both info and man include the following:

...
       -a file
              True if file exists.
       -b file
              True if file exists and is a block special file.
       -c file
              True if file exists and is a character special file.
       -d file
              True if file exists and is a directory.
       -e file
              True if file exists.
       -f file
              True if file exists and is a regular file.
...

Of course, they both also include documentation about -a being &&. My
suspicion is that -a might be unary-file-test (can't add ! to negate the
condition for example)?? but I haven't tested this... it could just be a
doco bug.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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