GNU bug report logs -
#38792
man grep
Previous Next
Reported by: Martin Simons <martin <at> webhuis.nl>
Date: Sun, 29 Dec 2019 15:19:01 UTC
Severity: normal
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
Message #26 received at 38792 <at> debbugs.gnu.org (full text, mbox):
2019-12-30 01:59:09 -0800, Paul Eggert:
> Thanks, I installed the attached, which is a bit more conservative than what you
> suggested but which I hope catches all the issues.
[...]
> @example
> -grep -l 'main' *.c
> +grep -l 'main' test-*.c
> @end example
[...]
Thanks,
though I find it's a bit of a shame to /hide/ the problem like
that here.
It's so common for people to forget that "--" (I just came
across https://en.wikipedia.org/wiki/Glob_(programming) which
does that mistake in the very first paragraph for instance) that
it would be beneficial IMO if the manual showed the right way to do,
especially for the GNU implementation of grep which makes the
problem worse by accepting options after non-option arguments.
Please consider making it
grep -l -- 'main' *.c
to raise awareness and try and teach people "the right way".
--
Stephane
This bug report was last modified 4 years and 238 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.