Update of bug #31736 (project grep):
Status: None => Invalid
Open/Closed: Open => Closed
_______________________________________________________
Follow-up Comment #1:
Not a bug.
Use 'grep -- --file' or 'grep -- ./--file' instead.
The behavior of -- to end option arguments is mandated by POSIX.
Additionally, when running with POSIXLY_CORRECT set in the environment, you
are guaranteed that 'grep str --file' will treat --file as a filename per
POSIX (since str is not an option); but when not running with POSIXLY_CORRECT,
you are subject to the GNU behavior of option reordering (--file is recognized
as an option even though str is not); the same approach of using 'grep -- str
--file' also works to avoid this option reordering.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?31736>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/