1.\" $NetBSD: zgrep.1,v 1.2 2005/09/11 23:30:20 wiz Exp $ 2.\" 3.\" Copyright (c) 2003 Thomas Klausner. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 3. The name of the author may not be used to endorse or promote products 14.\" derived from this software without specific prior written permission. 15.\" 16.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26.Dd December 28, 2003 27.Dt ZGREP 1 28.Os 29.Sh NAME 30.Nm zgrep , 31.Nm zegrep , 32.Nm zfgrep 33.Nd print lines matching a pattern in gzip-compressed files 34.Sh SYNOPSIS 35.Nm 36.Op Ar grep-flags 37.Op Fl - 38.Ar pattern 39.Op Ar files ... 40.Pp 41.Nm zegrep 42.Op Ar grep-flags 43.Op Fl - 44.Ar pattern 45.Op Ar 46.Pp 47.Nm zfgrep 48.Op Ar grep-flags 49.Op Fl - 50.Ar pattern 51.Op Ar 52.Sh DESCRIPTION 53.Nm 54runs 55.Xr grep 1 56on 57.Ar files 58or stdin, if no 59.Ar files 60argument is given, after decompressing them with 61.Xr zcat 1 . 62.Pp 63The 64.Ar grep-flags 65and 66.Ar pattern 67arguments are passed on to 68.Xr grep 1 . 69If an 70.Fl e 71flag is found in the 72.Ar grep-flags , 73.Nm 74will not look for a 75.Ar pattern 76argument. 77.Pp 78.Nm zegrep 79calls 80.Xr egrep 1 , 81while 82.Nm zfgrep 83calls 84.Xr fgrep 1 . 85.Sh EXIT STATUS 86In case of missing arguments or missing pattern, 871 will be returned, otherwise 0. 88.Sh SEE ALSO 89.Xr egrep 1 , 90.Xr fgrep 1 , 91.Xr grep 1 , 92.Xr gzip 1 , 93.Xr zcat 1 94.Sh AUTHORS 95.An Thomas Klausner 96.Aq wiz@NetBSD.org 97