[Fedora-packaging] Find with -exec?

Dave Johansen davejohansen at gmail.com
Thu May 28 03:04:19 UTC 2015


On Sun, May 17, 2015 at 5:59 AM, Nico Kadel-Garcia <nkadel at gmail.com> wrote:

> On Sat, May 16, 2015 at 3:02 PM, Dave Johansen <davejohansen at gmail.com>
> wrote:
>
> > Nevermiind. This was a stupid mistake on my part. I had a logical error.
> I
> > was doing "find -name "a*" -or -name "b*" -exec cmd {} \; and forgot that
> > the I needed to enclose the -or in \( \) so that the -exec would happen
> on
> > all conditions.
> > Sorry for the noise,
> > Dave
>
> If I may suggest? Next time, use two find commands for legibility.
>

Thanks for the tip. I changed it to the following to simplify things:
find -name "a*" -or -name "b*" | xargs cmd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/packaging/attachments/20150527/d116e206/attachment.html>


More information about the packaging mailing list