zsh-users
 help / color / mirror / code / Atom feed
From: Philip Dexter <philip.dexter@gmail.com>
To: zsh-users@zsh.org
Subject: Re: executing commands in directories containing specific files
Date: Tue, 11 Feb 2014 20:17:36 -0500	[thread overview]
Message-ID: <CALyv6VBuNBYg-D2rzXu36S=_cnT_6LqdEKHHDajUGy7s3ioXOg@mail.gmail.com> (raw)
In-Reply-To: <ldefjc$9l1$1@ger.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

On Tue, Feb 11, 2014 at 7:35 PM, Jan Larres <jan@majutsushi.net> wrote:

> On 12/02/14 13:11, Leonardo Barbosa wrote:
> > I'd like to find TeX files (find $HOME -type f -name '*.tex'). Let's say
> i
> > have found files a.tex, b.tex, and c.tex. Now, i wanna remove a.aux,
> b.aux,
> > c.aux. What's the best way of doing that?
>
> find $HOME -type f -name '*.tex' -exec rm {} \;
>
>
That won't get the aux files

I would use

for f in $HOME/**/*.tex; do rm $f; rm ${f:r}.aux; done

  reply	other threads:[~2014-02-12  1:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  0:11 Leonardo Barbosa
2014-02-12  0:35 ` Jan Larres
2014-02-12  1:17   ` Philip Dexter [this message]
2014-02-12  2:17     ` Jan Larres
2014-02-12  1:53 ` Chris Johnson
2014-02-12  5:13 ` Bart Schaefer
2014-02-12  8:33   ` Michel
2014-02-12  9:44     ` Leonardo Barbosa
2014-02-12 18:33     ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALyv6VBuNBYg-D2rzXu36S=_cnT_6LqdEKHHDajUGy7s3ioXOg@mail.gmail.com' \
    --to=philip.dexter@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).