From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8260 invoked by alias); 12 Feb 2014 08:34:06 -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: 18426 Received: (qmail 8033 invoked from network); 12 Feb 2014 08:33:51 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=OlLOeeQUVbYLAGiUvpsgm8QnqmgA9KKmwgiHstF99zg=; b=R+GHZ2/X4lVEIyk3coWJQA8qeAcFr4y4a0RphcGns0a7m4lsM+TXmseNmjxf+CELX9 YKMH4NBd33gqVjrtXJYY00DDwbfuYuYiGD4V1H63GVyh9Pc3Ae/fV8C/Und5ntgx75GW X30BZrdxWl5NxFVtxbdUcNHor9MQv5XEHgu8D5r9N1/KbZTXcXRDfdUv7vq1MSr0BoZU fot4hoyfVz4JmQzcLAEQ7YgiGW4J9P6/hMzh1vW3K/RTsJDf30xjL/+5UJ/b51wXbEC8 GDKCTtC405Sxa7hHGijAEN1AgJVBjbWbcRFwctFSJLYvFpV8Jo5EqbjhxRAOkxF0kSdc 0yPw== X-Received: by 10.180.72.195 with SMTP id f3mr923814wiv.61.1392194028327; Wed, 12 Feb 2014 00:33:48 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <140211211309.ZM24838@torch.brasslantern.com> References: <140211211309.ZM24838@torch.brasslantern.com> From: Michel Date: Wed, 12 Feb 2014 09:33:28 +0100 Message-ID: Subject: Re: executing commands in directories containing specific files To: Bart Schaefer Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=f46d043c7b8c84793604f2316e45 --f46d043c7b8c84793604f2316e45 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable > > I like using the (e) flag, but it's sometimes tricky to get right on the > first try because you have to be careful to match up the parens in the > reply=3D(...) assignment, the quotes around the expression, the outer set > of delimiters (I used [...] below) and the parens around the whole thing: > > rm **/*.tex(.e['reply=3D(${REPLY:r}.aux)']) > > But you can also use colon-modifiers as glob qualifiers, so if the .tex > never appears anywhere but at the end: > > rm **/*.tex(.:s/.tex/.aux) > thanks for this solutions interesting ! > > If you've already got the filenames, say, in an array: > > texi=3D( $(find $HOME -type f -name '*.tex') ) > Why use find instead the glob way=E2=80=AF: texi=3D( **/*.tex(.) ) When the result is use as a stream find is a beter way but to create an array ? _____________________ Michel BARRET --f46d043c7b8c84793604f2316e45--