bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #31702] command line option '--include' acts as '--exclude'


From: Stepan Kasal
Subject: [bug #31702] command line option '--include' acts as '--exclude'
Date: Fri, 19 Nov 2010 14:29:38 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12

Update of bug #31702 (project grep):

                  Status:                    None => Confirmed              

    _______________________________________________________

Follow-up Comment #1:

The options --include and --exclude were designed as an extension of the
"recursive search" feature, option -r.
In that context, it works as expected:
grep main . -r --include="*.c"
grep main . -r --exclude="*.c"

If you want more flexibility, the Unix way is to use the proper tool: "find"
is designed to search for files:

find -name '*.c' | xargs grep main
find ! -name '*.c' | xargs grep main

But back to your report:
yes, it seems that at --include combined with -r does nto behave sensibly.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31702>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]