GNU bug report logs - #38792
man grep

Previous Next

Package: grep;

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


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Stephane Chazelas <stephane.chazelas <at> gmail.com>
Cc: 38792 <at> debbugs.gnu.org
Subject: bug#38792: man grep
Date: Mon, 30 Dec 2019 10:45:35 -0800
On 12/30/19 9:54 AM, Stephane Chazelas wrote:
> Please consider making it
> 
> 
> grep -l -- 'main' *.c
> 
> to raise awareness and try and teach people "the right way".

Interactively, I invariably use 'grep foo *.c' without the '--' and it works
just fine because the files under my control have names that do not start with
'-'. This is standard practice and simplifies the common-usage examples. So
although '--' should (and does) appear in examples to document a defensive
measure for scripts that must work even in nonstandard environments, '--'
needn't be used in examples everywhere that it could conceivably apply.




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.