bug-bash
[Top][All Lists]
Advanced

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

Re: builtin test command file existence fails with negation


From: Chet Ramey
Subject: Re: builtin test command file existence fails with negation
Date: Tue, 21 Jul 2009 17:58:41 -0400

> Bash Version: 3.2
> Patch Level: 48
> Release Status: release
> 
> Description:
>       Use of the '-a' option to the builtin test command fails to
>       produce the correct result when used with negation. The specific
>       error the case where the file exists and a "test ! -a file" is
>       executed.  If the script is changed to use '-e' for file
>       existence the result is correct as expected.  If the script is
>       modified to place parenthesis around the '-a file' expression,
>       the result is also correct.

Please read the Bash FAQ, question E1.

The same information is in the description of `test' in the bash man
page.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    chet@case.edu    http://tiswww.tis.case.edu/~chet/




reply via email to

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