bug#70511: Option to grep into compressed files

2024-04-23 Thread Mary via Bug reports for GNU grep
> 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 wh

bug#70511: Option to grep into compressed files

2024-04-23 Thread Dennis Clarke via Bug reports for GNU grep
On 4/23/24 11:21, Mary via Bug reports for GNU grep wrote: Thanks for the suggestion. You're right, this would be better than zgrep etc. What happened to the old UNIX concept of Do one thing. Do it well. Then stop. To grep a compressed stream of bits you just p

bug#70540: grep -c -r | grep -v ':0$'

2024-04-23 Thread Dale R. Worley
At least once a week, and often several times a day, I want to search a tree of files to list the files in a directory containing a pattern, along with the *numbers* of patterns in the files. Usually this is because I'm looking for a file that contains a number of instances of the pattern, from am

bug#70511: Option to grep into compressed files

2024-04-23 Thread jackson
Paul Eggert wrote: > I have some qualms though, as the new option would increase the attack > surface for 'grep', Agreed. Given the recent uproar involving liblzma being linked into ssh in systemd builds, resulting in a potentially very dangerous ssh compromise ... ... I would think that minimi

bug#70511: Option to grep into compressed files

2024-04-23 Thread David G. Pickett
Shell scripting can take file names in from a find or ls with 'while read', or by globbing 'for f in pattern', and examine them one by one, run 'grep -q' to find out if the file or uncompressed stream from that file has a match, and if so 'echo' the file name out, or if you want lines, it can '

bug#70511: Option to grep into compressed files

2024-04-23 Thread Mary via Bug reports for GNU grep
> Do you know zgrep from zutils? TIL! My system does not come with those by default, and instead provides a `zgrep` that is a Bash script supporting only `gzip`. Are those the generally recommended tools to use? (I'm not sure why `zgrep`/`bzgrep`/`xzgrep` would be provided by their respective p