[illumos-Developer] grep -Z etc? (decompress! was: webrev: 650 grep support for -q ...)

Yuri Pankov yuri.pankov at gmail.com
Thu May 5 19:52:02 PDT 2011


On Thu, May 05, 2011 at 10:21:09PM -0400, Gordon Ross wrote:
> I have mixed feelings about seeing uncompress support in grep.
> Perhaps that's useful, but it violates the Unix design principle of
> making tools that each do one thing well (or set of related things)
> and that can be easily combined to more complex thing.
> 
> Am I just being old fashioned?

Think of archives as just another type of file. grep's purpose is to
match lines in files (of different kind) and it does just that - using
those libraries to look inside compressed files. It is especially useful
when doing recursive grep. Just how I see it, anyway.
 
> Note that these options cause grep to drag in
> libzlib and libbz2 for the decompress support.
> One of which is not in core illumos...

Both of them aren't...

$ grep -rE 'lib(z|bz2)\.so' usr/src/pkg/manifests/; echo $?
1

Anyway, disabling decompression will just need several #ifdef's..


Yuri



More information about the Developer mailing list