does a zgrep exist? (zgrep <> zcat | grep)

Tom Christiansen tchrist at convex.COM
Mon Feb 18 18:53:30 AEST 1991


>From the keyboard of uunet!bria!mike:
:Why, when grep assumes stdin if you only supply the regex?
:
:	zcat file.Z | grep regex

Guys, the original problem was that 

	zcat *.Z | grep regexp

didn't help him identify in which file the match was found.  Witness:

>From brister at decwrl.december.com (James Brister) in
<BRISTER.91Feb14204903 at saratoga.decwrl.december.com>:

>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.  Uncompressing the files before
>greping isn't really wanted, cause you may not have the space on disk.

How quickly we forget!

--tom
--
Tom Christiansen		tchrist at convex.com	convex!tchrist
 "All things are possible, but not all expedient."  (in life, UNIX, and perl)



More information about the Comp.unix.shell mailing list