A NOTE has been added to this issue. 
====================================================================== 
http://austingroupbugs.net/view.php?id=1941 
====================================================================== 
Reported By:                dwheeler
Assigned To:                ajosey
====================================================================== 
Project:                    1003.1(2008)/Issue 7
Issue ID:                   1941
Category:                   Shell and Utilities
Type:                       Enhancement Request
Severity:                   Objection
Priority:                   normal
Status:                     Under Review
Name:                       David A. Wheeler 
Organization:                
User Reference:              
Section:                    grep 
Page Number:                1 
Line Number:                1 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2025-08-30 21:51 UTC
Last Modified:              2025-08-31 00:07 UTC
====================================================================== 
Summary:                    Add widely-implemented options to grep
====================================================================== 

---------------------------------------------------------------------- 
 (0007242) mirabilos (reporter) - 2025-08-31 00:07
 http://austingroupbugs.net/view.php?id=1941#c7242 
---------------------------------------------------------------------- 
I have conflicting options.

>   -H Print the file name for each selection. This is the default when there is
more
>   than  one  file  given  to search. If the -o option is provided, the file
name is
>   provided on each selection. See the -h option.

versus:

     -H      If -R is specified, follow symbolic links only if they were ex-
             plicitly listed on the command line. The default is not to follow
             symbolic links.

And:

>   -o Display only the selected (non-empty) part(s) of a matching line. If
there are

versus:

     -o      Always print filename headers with output lines.

Also:

>   All  implement recursively following directories using at least -r, and
sometimes
>   -R  and  --recursive  and  -d recurse. However, there are some differences
in how
>   they handle symbolic links. That idea could be taken up separately.

Nope, BSD has -R but not -r:

     -R      Recursively search subdirectories listed.


BSD has had -o and -H assigned like this for over two decades,
so I’m not sure whether occupying it by a GNU extension with
different semantics (which I am aware of as Debian Developer)
is wise.



Addendum:

>   -L List names of files that were processed but no lines were selected.

This is more specific (again from the BSD manpage):

     -L      Only the names of files not containing selected lines are written
             to standard output. Pathnames are listed once per file searched.
             If the standard input is searched, the string "(standard input)"
             is written.

(“once per file searched” lists it twice if the same input file is
given twice, of course) 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2025-08-30 21:51 dwheeler       New Issue                                    
2025-08-30 21:51 dwheeler       Status                   New => Under Review 
2025-08-30 21:51 dwheeler       Assigned To               => ajosey          
2025-08-30 21:56 dwheeler       Note Added: 0007240                          
2025-08-30 21:59 dwheeler       Note Added: 0007241                          
2025-08-31 00:07 mirabilos      Note Added: 0007242                          
======================================================================


  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group

Reply via email to