[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Dubious parse in builtin 'test' command
From: |
Finn Wilcox |
Subject: |
Dubious parse in builtin 'test' command |
Date: |
Sat, 8 Dec 2007 14:34:05 -0000 |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: cygwin
Compiler: gcc
Compilation
CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='cygwin'
-DCONF_MACHTYPE='i686-pc-cygwin' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/
locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS -I. -I/h
ome/eblake/bash-3.2.25-17/src/bash-3.2 -I/home/eblake/bash-3.2.25-17/src/bas
h-3.2/include -I/home/eblake/bash-3.2.25-17/src/bash-3.2/lib -O2 -pipe
uname output: CYGWIN_NT-5.0 zorin 1.5.24(0.156/4/2) 2007-01-31 10:57 i686
Cygwin
Machine Type: i686-pc-cygwin
Bash Version: 3.2
Patch Level: 25
Release Status: release
Description:
builtin "test" command does not behave as expected with args "! -a FILE"
Repeat-By:
$ help test
...
-a FILE True if file exists
...
$ test -e /dev/null ; echo $?
0
$ test -a /dev/null ; echo $?
0
$ test ! -e /dev/null ; echo $?
1
$ test ! -a /dev/null ; echo $?
0
$ /bin/test ! -a /dev/null ; echo $?
1
The fourth case is surprising.
Is -a supposed to be equivalent to -e and why is it needed?
- Dubious parse in builtin 'test' command,
Finn Wilcox <=