[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-diffutils] bug#15452: bug#15452: Comparing files whose name _do_ ma
From: |
Eric Blake |
Subject: |
[bug-diffutils] bug#15452: bug#15452: Comparing files whose name _do_ match a certain pattern |
Date: |
Tue, 24 Sep 2013 08:08:23 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8 |
On 09/24/2013 01:59 AM, Dani Moncayo wrote:
> [Please, keep my address in CC, as I'm not subscribed to this list]
>
> Hello,
>
> I'm badly missing an "--include" option in "diff", which would have
> the inverse effect of "--exclude", i.e., to consider only files whose
> names _do_ match a certain pattern.
>
> I've been searching the internet and also this mailing list, seeking a
> way of doing this, but I've failed so far, and I'm quite surprised
> that such a feature isn't implemented already.
Ah, but why should we bloat diff when find already gives you what you want:
find . -name '*.txt' -exec diff {} other/{} \;
will run diff on only files ending in *.txt, when comparing . against
other/.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature