GNU bug report logs - #45432
Use both --include and --exclude at the same time

Previous Next

Package: grep;

Reported by: "Fred .Flintstone" <eldmannen <at> gmail.com>

Date: Fri, 25 Dec 2020 16:57:02 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Fred .Flintstone" <eldmannen <at> gmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Norihiro Tanaka <noritnk <at> kcn.ne.jp>, 45432 <at> debbugs.gnu.org
Subject: bug#45432: Use both --include and --exclude at the same time
Date: Thu, 7 Jan 2021 13:58:42 +0100
[Message part 1 (text/plain, inline)]
Thanks!

I didn't know about the --exclude-dir option.

On Thu, Jan 7, 2021 at 7:16 AM Paul Eggert <eggert <at> cs.ucla.edu> wrote:

> On 1/6/21 12:12 PM, Fred .Flintstone wrote:
> > Yes, I meant like Tanaka said, I want BOTH to include AND exclude.
> > So I can include only a file extension, and exclude certain directories
> > such as directories containing unit tests and integration tests.
>
> grep -r --include='*.cs' --exclude-dir='tests' PATTERN DIR
>
[Message part 2 (text/html, inline)]

This bug report was last modified 4 years and 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.