On 2007-08-22 13:53:34 +0200, Vincent Lefevre wrote:
> Now, what about the following test, which does not test file existence?
> 
> [EMAIL PROTECTED]:~$ [ true -a \( ! -a \) ] && echo OK
> bash: [: `)' expected, found ]
> [EMAIL PROTECTED]:~$ /usr/bin/[ true -a \( ! -a \) ] && echo OK
> [EMAIL PROTECTED]:~$
> 
> This is unspecified by POSIX, but test(1) has its own documentation.
> If you prefer, the bash builtin breaks the compatibility with test(1)
> even if it is non-standard.

Well, if fact, no need to use -a:

[EMAIL PROTECTED]:~$ /usr/bin/[ \( ! -e \) ] && echo OK
[EMAIL PROTECTED]:~$ [ \( ! -e \) ] && echo OK
bash: [: `)' expected, found ]

-- 
Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to