X-Spam-Check-By: sourceware.org Message-ID: <43A6CDA0.8060508@scytek.de> Date: Mon, 19 Dec 2005 10:11:28 -0500 From: Volker Quetschke User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: test -e cannot distinguish between foo and foo.exe Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigE5F42622652AA38DBD944D18" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enigE5F42622652AA38DBD944D18 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I noticed the following behaviour: (found by my favorite testcase ;) ) $ rm -rf foo* ; touch foo.exe $ test -e foo && echo found foo found foo $ test -e foo.exe && echo found foo.exe found foo.exe Hmm, how can I test if foo exists without also looking at foo.exe? Does this count as a bug in test? My current workaround is $ find . -maxdepth 1 -name foo -exec echo _XfoundX_ \; | grep _XfoundX_ > /dev/null && echo found foo but that is a bit ugly. Regards Volker -- PGP/GPG key (ID: 0x9F8A785D) available from wwwkeys.de.pgp.net key-fingerprint 550D F17E B082 A3E9 F913 9E53 3D35 C9BA 9F8A 785D --------------enigE5F42622652AA38DBD944D18 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (MinGW) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFDps2kPTXJup+KeF0RAoDQAJ90yudc/24Q4f0hrshm6D8siHkLbwCg3n3n DEpZH/4jRWtRWaU6PctqAJY= =5eBc -----END PGP SIGNATURE----- --------------enigE5F42622652AA38DBD944D18--