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.
Bug 1103270 - undocumented option --fixed-regexp
Summary: undocumented option --fixed-regexp
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: grep
Version: 6.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jaroslav Škarvada
QA Contact: Jan Kepler
URL:
Whiteboard:
Depends On: 1103259
Blocks: 1159825
TreeView+ depends on / blocked
 
Reported: 2014-05-30 14:51 UTC by Martin Frodl
Modified: 2015-07-22 06:18 UTC (History)
4 users (show)

Fixed In Version: grep-2.20-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: The option --fixed-regexp is obsoleted and wasn't mentioned in the manual page. Consequence: This could cause confusion, as the manual page is inconsistent with the built-in help of grep. Fix: The missed option was added to the manual page with the notice that it is obsoleted and shouldn't be used. Result: Now the built-in help and manual page are more consistent regarding the --fixed-regexp option.
Clone Of: 1103259
Environment:
Last Closed: 2015-07-22 06:18:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:1447 0 normal SHIPPED_LIVE Low: grep security, bug fix, and enhancement update 2015-07-20 18:43:55 UTC

Description Martin Frodl 2014-05-30 14:51:03 UTC
+++ This bug was initially created as a clone of Bug #1103259 +++

Description of problem:

The synonymous -F and --fixed-strings command-line options are used to interpret the pattern as a list of fixed strings, separated by newlines, any of which is to be matched. This is correctly mentioned both on the man page and in the usage message. Apart from these, however, the option --fixed-regexp appears to serve quite the same purpose, despite it not being documented anywhere.

$ echo 'studying' | grep -F 'dying'
studying
$ echo 'studying' | grep --fixed-strings 'dying'
studying
$ echo 'studying' | grep --fixed-regexp 'dying'
studying

Inasmuch as I could tell, this was probably the only undocumented option synonymous to -F. It does not work with an arbitrary string starting with the "--fixed-" prefix:

$ echo 'studying' | grep --fixed-fence 'dying'
grep: unrecognized option '--fixed-fence'
Usage: grep [OPTION]... PATTERN [FILE]...
Try 'grep --help' for more information.

To fix this bug, the --fixed-regexp command-line option should be either included in the documentation or wholly removed.


Version-Release number of selected component (if applicable):
grep-2.16-1.el7.x86_64


How reproducible:
always

Comment 1 Martin Frodl 2014-05-30 14:57:20 UTC
grep version mentioned in the description (grep-2.16-1.el7.x86_64) applies to the original RHEL 7 bug. For RHEL 6.6, the relevant version is grep-2.6.3-4.el6.x86_64.

Comment 2 Jaroslav Škarvada 2014-10-24 12:40:25 UTC
From the changelog:
 - The --fixed-regexp option has been renamed to --fixed-string.

Currently it's an alias to -F. I guess it was kept there for backward compatibility and removed from the docs for users not to use it. We may describe it in the man with the notice that it's obsoleted, can be removed anywhere and shouldn't be used.

Comment 9 errata-xmlrpc 2015-07-22 06:18:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-1447.html


Note You need to log in before you can comment on or make changes to this bug.