+++ 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'
$ echo 'studying' | grep --fixed-strings 'dying'
$ echo 'studying' | grep --fixed-regexp 'dying'
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 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.
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.
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.