does a zgrep exist? (zgrep <> zcat | grep)
Ronald S H Khoo
ronald at robobar.co.uk
Sat Feb 16 10:28:54 AEST 1991
brister at decwrl.dec.com (James Brister) writes:
> It would be nice to grep through compressed files. Sure, you can do zcat |
> grep regexp, but then you loose the ability of grep to tell you the
> filename and/or linenumber of a match.
Well, if you have it, zcat | grep regexp /dev/stdin would do what you wanted.
If you can't hack a /dev/stdin driver into your kernel, then as an alternative
you could modify grep to understand "-" as a filename.
--
Ronald Khoo <ronald at robobar.co.uk> +44 81 991 1142 (O) +44 71 229 7741 (H)
More information about the Comp.unix.shell
mailing list