1.\" $NetBSD: zgrep.1,v 1.3 2008/05/08 15:35:23 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.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24.Dd December 28, 2003 25.Dt ZGREP 1 26.Os 27.Sh NAME 28.Nm zgrep , 29.Nm zegrep , 30.Nm zfgrep 31.Nd print lines matching a pattern in gzip-compressed files 32.Sh SYNOPSIS 33.Nm 34.Op Ar grep-flags 35.Op Fl - 36.Ar pattern 37.Op Ar files ... 38.Pp 39.Nm zegrep 40.Op Ar grep-flags 41.Op Fl - 42.Ar pattern 43.Op Ar 44.Pp 45.Nm zfgrep 46.Op Ar grep-flags 47.Op Fl - 48.Ar pattern 49.Op Ar 50.Sh DESCRIPTION 51.Nm 52runs 53.Xr grep 1 54on 55.Ar files 56or stdin, if no 57.Ar files 58argument is given, after decompressing them with 59.Xr zcat 1 . 60.Pp 61The 62.Ar grep-flags 63and 64.Ar pattern 65arguments are passed on to 66.Xr grep 1 . 67If an 68.Fl e 69flag is found in the 70.Ar grep-flags , 71.Nm 72will not look for a 73.Ar pattern 74argument. 75.Pp 76.Nm zegrep 77calls 78.Xr egrep 1 , 79while 80.Nm zfgrep 81calls 82.Xr fgrep 1 . 83.Sh EXIT STATUS 84In case of missing arguments or missing pattern, 851 will be returned, otherwise 0. 86.Sh SEE ALSO 87.Xr egrep 1 , 88.Xr fgrep 1 , 89.Xr grep 1 , 90.Xr gzip 1 , 91.Xr zcat 1 92.Sh AUTHORS 93.An Thomas Klausner 94.Aq wiz@NetBSD.org 95