GNU bug report logs -
#70511
Option to grep into compressed files
Previous Next
Full log
View this message in rfc822 format
[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.