delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Message-ID: | <4406FAD3.7000004@byu.net> |
Date: | Thu, 02 Mar 2006 07:01:55 -0700 |
From: | Eric Blake <ebb9 AT byu DOT net> |
User-Agent: | Thunderbird 1.5 (Windows/20051201) |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com, Alessio DOT MASSARO AT oxinst DOT co DOT uk |
Subject: | Re: empty directory globbing in bash/sh for loops |
References: | <158B6C2B3023D3119CC000508B08FA3C098870B7 AT ukrintx01 DOT oxinst DOT co DOT uk> |
In-Reply-To: | <158B6C2B3023D3119CC000508B08FA3C098870B7@ukrintx01.oxinst.co.uk> |
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 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Alessio DOT MASSARO AT oxinst DOT co DOT uk on 3/2/2006 6:10 AM: > In the Cygwin bash the following statement > > for file in ./SOME_EMPTY_DIR/* ; do do_it_on $file ; done > > executes the following once because of how globbing is done. > > do_it_on ./SOME_EMPTY_DIR/* Correct - POSIX requires that. However, bash also has the 'shopt -s nullglob' which may help in your situation. > > Unfortunately the gcc 4.0.2 makefiles do use this on possibly empty > directories and break. > > Does anybody know how to solve this, please? If it hurts, don't do it. Report the bug to the gcc folks, if they aren't being robust enough to protect against an empty directory. > Unless stated above to be non-confidential, this E-mail and any > attachments are private and confidential and are for the addressee > only and may not be used, copied or disclosed save to the addressee. Oops - not anymore. Please don't send email to publicly archived mailing lists with unenforceable legalese trash at the bottom (open up a free web-based account, if necessary). - -- Life is short - so eat dessert first! Eric Blake ebb9 AT byu DOT net volunteer cygwin bash maintainer -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.1 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEBvrT84KuGfSFAYARAp9CAKDZBFlVLVzsGZG2Kw4njzl0GWwHrgCcCHWx eG/Kto3FzNxk3+6LuHJRvxI= =M2iD -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |