Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: executing commands in directories containing specific files
- X-seq: zsh-users 18426
- From: Michel <michel.barret@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: executing commands in directories containing specific files
- Date: Wed, 12 Feb 2014 09:33:28 +0100
- Cc: zsh-users@xxxxxxx
- 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==
- In-reply-to: <140211211309.ZM24838@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAMXWGTzazAWLG6y1Q_zKvxmUewgAq9Z9CdksQ-Tb7kxfP-RHUg@mail.gmail.com> <140211211309.ZM24838@torch.brasslantern.com>
>
> 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=(...) 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=(${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=( $(find $HOME -type f -name '*.tex') )
>
Why use find instead the glob way :
texi=( **/*.tex(.) )
When the result is use as a stream find is a beter way but to create an
array ?
_____________________
Michel BARRET
Messages sorted by:
Reverse Date,
Date,
Thread,
Author