www.delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <43A6CDA0.8060508@scytek.de> |
Date: | Mon, 19 Dec 2005 10:11:28 -0500 |
From: | Volker Quetschke <quetschke AT scytek DOT de> |
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 |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |