GNU bug report logs - #70511
Option to grep into compressed files

Previous Next

Package: grep;

Reported by: Mary <marycada <at> proton.me>

Date: Mon, 22 Apr 2024 06:52:04 UTC

Severity: normal

Full log


View this message in rfc822 format

From: "David G. Pickett" <dgpickett <at> aol.com>
To: Mary <marycada <at> proton.me>, Paul Eggert <eggert <at> cs.ucla.edu>
Cc: "70511 <at> debbugs.gnu.org" <70511 <at> debbugs.gnu.org>
Subject: bug#70511: Option to grep into compressed files
Date: Mon, 22 Apr 2024 14:00:32 +0000 (UTC)
[Message part 1 (text/plain, inline)]
 One supposes that if the file extension is not trustworthy, one can taste file like the file command, and use libraries like the gzip libraries to handle gzipped files as a stream.  There are so many others: zip files could be treated like directories and all the files in them that match the glob could be searched, and then there is bzip2, 7zip, ....  It becomes a popularity contest!  One can do all this with shell scripting, and leave poor old grep out of it!
    On Monday, April 22, 2024 at 03:48:14 AM EDT, Paul Eggert <eggert <at> cs.ucla.edu> wrote:  
 
 Thanks for the suggestion. You're right, this would be better than zgrep 
etc.

I have some qualms though, as the new option would increase the attack 
surface for 'grep', in that you could then execute arbitrary code by 
passing certain options to 'grep'. Is there some safer way to get what 
you want?



  
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 39 days ago.

Previous Next


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