A NOTE has been added to this issue. 
====================================================================== 
https://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-09-01 05:57 UTC
====================================================================== 
Summary:                    Add widely-implemented options to grep
====================================================================== 

---------------------------------------------------------------------- 
 (0007246) stephane (reporter) - 2025-09-01 05:57
 https://austingroupbugs.net/view.php?id=1941#c7246 
---------------------------------------------------------------------- 
Note that the reason those are widespread is that for the longest time BSDs
actually shipped with GNU grep (some version thereof), many have since
eventually re-implemented theirs trying to keep the GNU API, but sometimes
diverging between themselves and from GNU grep after (and even before as they
stayed on an older version of GNU grep) that point.

Recursive grep is very unportable in part because in GNU grep it has changed
greatly over the years with regards to handling of symlinks and non-regular
files. Divergences are hard to reconciliate now. -L/-H like in other recursive
tools can't be used because they're used for other things in GNU grep, and
anyway we'd need a third one for whether or not to process symlinks to regular
files when doing  a traversal that doesn't itself follow symlinks.

ast-open grep (which can also be made the grep builtin of ksh93, though I don't
know whether there's any system where that's the case) is another grep
implementation that has incorporated many of GNU grep's features
(https://github.com/ksh93/ast-open-archive/blob/2014-12-24/src/lib/libcmd/grep.c#L23-L113).
Its -o prints empty matches (a bug as it means it runs into infinite loops in
that case). 

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                          
2025-08-31 00:10 mirabilos      Note Added: 0007243                          
2025-08-31 21:52 dwheeler       Note Added: 0007244                          
2025-08-31 22:01 dwheeler       Note Added: 0007245                          
2025-09-01 05:57 stephane       Note Added: 0007246                          
======================================================================


  • [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