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 06:05 UTC ====================================================================== Summary: Add widely-implemented options to grep ======================================================================
---------------------------------------------------------------------- (0007247) stephane (reporter) - 2025-09-01 06:05 https://austingroupbugs.net/view.php?id=1941#c7247 ---------------------------------------------------------------------- -o would be more useful with an option to print what was matched by capture groups like in pcre2grep (formerly pcregrep)'s <pre>$ echo foobar | pcre2grep -o1 -o2 -o3 --om-separator=, '(.)(.)(.)' f,o,o b,a,r</pre> That's one reason I often use pcre2grep instead of grep. Doing it with perl (the p in pcre2grep) is not much more difficult here: <pre>$ echo foobar | perl -C -lne 'print "$1,$2,$3" while /(.)(.)(.)/g' f,o,o b,a,r</pre> But that's a different matter when you need to combine with other features of grep such as -r. 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 2025-09-01 06:05 stephane Note Added: 0007247 ======================================================================
