bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#38792: man grep


From: Paul Eggert
Subject: bug#38792: man grep
Date: Mon, 30 Dec 2019 10:45:35 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]