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
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
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
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
> 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