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


Message #17 received at 45432 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: "Fred .Flintstone" <eldmannen <at> gmail.com>,
 Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: 45432 <at> debbugs.gnu.org
Subject: Re: bug#45432: Use both --include and --exclude at the same time
Date: Wed, 6 Jan 2021 22:16:41 -0800
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




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.