Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Previously, the "--include" option did not process file names correctly. As a consequence, "--include" sometimes functioned as if the "--exclude" option was used. With this update, a patch has been applied to address the problem and "--include" now works correctly.
Description of problem:
--include not working as expected
See "How reproducible" and "Additional info" for example
Version-Release number of selected component (if applicable):
2.6.3
How reproducible:
cseraphi@DESK 14:47:49 /tmp/test$ echo foo >1 ; echo foo > 2
cseraphi@DESK 14:47:54 /tmp/test$ grep -H foo *
1:foo
2:foo
cseraphi@DESK 14:48:00 /tmp/test$ grep --exclude 1 -H foo *
2:foo
cseraphi@DESK 14:48:03 /tmp/test$ grep --include 1 -H foo *
2:foo
Actual results:
Expected results:
Additional info:
We're experiencing strange behavior with grep that appears to be a known bug in 2.6.3.
http://savannah.gnu.org/bugs/index.php?29876
As you can see in the release notes below, 2.7 specifically mentions --include not working
http://savannah.gnu.org/forum/forum.php?forum_id=6521
As an addendum-- in recursive mode, --include seems to work properly on subdirs. Stuff specifically named on the command line behaves very differently from stuff brought in implicitly by recursion.
cseraphi@DESK 14:53:04 /tmp/test$ echo foo >1 ; echo foo > 2 ; echo foo > subdir/10; echo foo > subdir/20
cseraphi@DESK 14:53:12 /tmp/test$ grep --include 1 -H foo *
2:foo
cseraphi@DESK 14:53:17 /tmp/test$ grep -r --include 1 -H foo *
2:foo
cseraphi@DESK 14:53:20 /tmp/test$ grep -r --include 10 -H foo *
1:foo
2:foo
subdir/10:foo
cseraphi@DESK 14:53:34 /tmp/test$ grep -r --include 10 -H foo .
./subdir/10:foo
The commitdiff for the patch that our user seems to be referring to (http://git.savannah.gnu.org/gitweb/?p=grep.git;a=commitdiff;h=9c45c193825d1f59e1d341e556ecf4adeb7a03a2) seems to basically show a '!' being dropped from a conditional
Comment 1Jaroslav Škarvada
2013-12-12 10:22:14 UTC