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: Kevin Hunter
Subject: [bug #31702] command line option '--include' acts as '--exclude'
Date: Thu, 18 Nov 2010 22:26:11 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Ubuntu/10.10 Chromium/7.0.517.44 Chrome/7.0.517.44 Safari/534.7

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

                 Summary: command line option '--include' acts as '--exclude'
                 Project: grep
            Submitted by: hunteke
            Submitted on: Thu 18 Nov 2010 10:26:10 PM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

I've read the pertinent areas of the man page a couple of times, but I may
yet just not be understanding something.  However, it appears that --include
acts the same as --exclude.  Test case:

-----
$ grep --version | head -1
GNU grep 2.6.3

$ dpkg -l | grep grep
ii  grep        2.6.3-3        GNU grep, egrep and fgrep

$ mkdir test; cd test
$ cat > test.c
#include <stdio.h>

int main ( ) {
  printf( "Test\n" );

  return ( 0 );
}

$ ln test.c test.cxx
$ ln test.c test.cpp
$ ls
test.c  test.cpp  test.cxx

$ grep main * --exclude="*.c"
test.cpp:int main ( ) {
test.cxx:int main ( ) {

$ grep main * --include="*.c"
test.cpp:int main ( ) {
test.cxx:int main ( ) {
-----

Am I missing something really simple?




    _______________________________________________________

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]