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