Package: bash
Version: 3.1dfsg-8
Severity: normal
The bash man page says that the unary -a behaves like -e:
-a file
True if file exists.
-e file
True if file exists.
But I get:
[EMAIL PROTECTED]:~$ touch exists
[EMAIL PROTECTED]:~$ [ ! -e exists ] || echo found
found
[EMAIL PROTECTED]:~$ [ ! -a exists ] || echo found
[EMAIL PROTECTED]:~$
However the following forms work as expected:
[EMAIL PROTECTED]:~$ [[ ! -e exists ]] || echo found
found
[EMAIL PROTECTED]:~$ [[ ! -a exists ]] || echo found
found
[EMAIL PROTECTED]:~$ [ -e exists ] && echo found
found
[EMAIL PROTECTED]:~$ [ -a exists ] && echo found
found
[EMAIL PROTECTED]:~$
Note: I don't think it is a good idea to use the non-standard unary -a
with [, but this is a bug anyway.
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Kernel: Linux 2.6.18-4-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages bash depends on:
ii base-files 4.0.0 Debian base system miscellaneous f
ii debianutils 2.18 Miscellaneous utilities specific t
ii libc6 2.5-4 GNU C Library: Shared libraries
ii libncurses5 5.5-5 Shared libraries for terminal hand
bash recommends no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]