GNU bug report logs - #75197
[Feature Request] Support 'grep -A' without number to show all lines after match

Previous Next

Package: grep;

Reported by: KMRH <kmrh47 <at> proton.me>

Date: Mon, 30 Dec 2024 12:09:02 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: KMRH <kmrh47 <at> proton.me>
Cc: 75197 <at> debbugs.gnu.org
Subject: bug#75197: [Feature Request] Support 'grep -A' without number to show all lines after match
Date: Mon, 30 Dec 2024 10:52:53 -0800
On 2024-12-30 03:37, KMRH via Bug reports for GNU grep wrote:
> Allow the command 'grep -A' (without specifying a number) to default to showing all lines after a match

We couldn't do that as-is, as 'grep -A 1' is equivalent to 'grep -A1' 
and people rely on that.

'grep -A 99999999999999999999999999999999999999999' does what you want 
already, even if 99999999999999999999999999999999999999999 is too big to 
fit into a machine word. Is that good enough? It would save your having 
to wait for the next grep release....

Alternatively, I suppose we could add syntax like 'grep -A Inf' to do 
what's requested, where "Inf" is short for infinity.




This bug report was last modified 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.