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