From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19918 invoked by alias); 31 Mar 2015 10:48:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20055 Received: (qmail 1667 invoked from network); 31 Mar 2015 10:48:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=6QjgZErNsqETLY9IR2ilWdcTfO2KX4sZ/hgPFlyTWto=; b=cJkjctOAKRnjHRtADj3GXjWkRlNYqZ/knXba9b/+HC4bzHa3kqyqVNmji60bpBoAun +7vQzkbx2/fH0j2t2b7zjLykErk5ezr2U0UC3821Onr8FIor+ZHBQxjYClFf9RhFVY/K NU5X7uBEhnGhg3FDTEJlAgfFTcwan4YjJzh7l1GjVvgBUyGWCIa9FSBOkNhrM25UP0Hk mimQ/YsJVJQ7XoF0bWNiKblaIwlIog52LEVsBYX65VWyRwNaKLh9waFFICzIWtRdG/uG BHA4LPUvd8v/gVn8LKLb9rOdmFeTS7Sjg73iBytZl2aq4dHxD4DVXawox442KiKOBgfZ 2T5g== X-Gm-Message-State: ALoCoQnOD/EPQphEFgcBKyIzfaAIOtB/qVFAYFS2AAE9uw/BY6MiWHJ08xx60Y54FvSDQuAqbOmy MIME-Version: 1.0 X-Received: by 10.194.185.68 with SMTP id fa4mr70802562wjc.111.1427798559106; Tue, 31 Mar 2015 03:42:39 -0700 (PDT) In-Reply-To: References: Date: Tue, 31 Mar 2015 03:42:38 -0700 Message-ID: Subject: Re: breadth first globbing From: Bart Schaefer To: Mikael Magnusson Cc: Zsh Users , jarausch@igpm.rwth-aachen.de Content-Type: multipart/alternative; boundary=047d7bacb11eed5acb05129341ba --047d7bacb11eed5acb05129341ba Content-Type: text/plain; charset=UTF-8 On Mar 31, 2015 3:05 AM, "Mikael Magnusson" wrote: > > On Tue, Mar 31, 2015 at 11:44 AM, Helmut Jarausch > wrote: > > > > I have (unpacked) a directory tree where directories don't have the executable bit. > > > > Standard globbing like **/*(/) doesn't work because zsh tries to cd to the directories > > before I can chmod +x these. > > > > I would probably just chmod -R +x followed by chmod -x **/*(.) Breadth-first globbing is **/*(/Od) but in this case the problem is that globbing itself can't match anything until the directory modes have changed, I think? So I'd just do something like while chmod +x **/*(/^x); do :; done Assuming you have nomatch set so the loop will fail when all directories have the x mode. --047d7bacb11eed5acb05129341ba--