Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: bash vs. python scripts - which one is better?

From: Vincent Lefevre <vincent(at)vinc17.org>
Date: Wed Aug 22 2007 - 10:08:56 EDT


On 2007-08-22 13:53:34 +0200, Vincent Lefevre wrote:
> Now, what about the following test, which does not test file existence?
>
> vlefevre@vin:~$ [ true -a \( ! -a \) ] && echo OK
> bash: [: `)' expected, found ]
> vlefevre@vin:~$ /usr/bin/[ true -a \( ! -a \) ] && echo OK
> vlefevre@vin:~$
>
> 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:

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

-- 
Vincent Lefèvre <
vincent(at)vinc17.org> - 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 debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Wed Aug 22 10:28:35 2007

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 02:40:59 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library