bug-bash
[Top][All Lists]
Advanced

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

-a is not -e ?! wrong entry in "man bash" ?


From: Martin Willner
Subject: -a is not -e ?! wrong entry in "man bash" ?
Date: Tue, 04 Mar 2003 12:01:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021126

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
- -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
- -DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib
~ -g -O2
uname output: Linux SoL16e 2.4.20 #10 SMP Thu Feb 20 18:01:36 CET 2003
i686 unknown
Machine Type: i686-pc-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:

We have found a very strange entry in the man-page:
line 1748:
~       -a file
~              True if file exists.

line 1756:
~       -e file
~              True if file exists.

- -a and -e should do the same according to the man-page, but they dont!

if [ -a /bin/bash ]  is TRUE if /bin/bash exists.
if [ ! -a /bin/bash ]  should be FALSE if /bin/bash exists, BUT it
returns TRUE.

if [ -e /bin/bash ] is TRUE if /bin/bash exists.
if [ ! -e /bin/bash ] is FLASE if /bin/bash exists.

So -a is not -e as the man-page says. So what does -a really do ? Is
this a bash bug or a man-page "bug" ?


Repeat-By:
~ Using -a does not do the same as -e, even is the manpage says so.

Fix:
~ Never use -a :)


- --
MfG
~ Martin Willner

~   antitachyon - Manalo & Willner OEG
~   --------------------------------------------------------------
~   Hugogasse 1/2, 1110 Wien            http://www.antitachyon.com
~   Tel: +43 (0)1 920 23 93             Fax: +43 (0)1 920 84 27

- ------------------------------------------------------------------
~       SoL - Server optimized Linux  R E L E A S E D !
~             checkout http://www.sol-linux.com
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+ZIeiiTxd5XdA9iARAkC+AKCvFDRIh+cwAWR8aLBgdPsvscMtVQCfdGEu
26EMN5wcHhTQK67oswJ+0f4=
=CL2b
-----END PGP SIGNATURE-----





reply via email to

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