1
.\" Copyright (c) 1990-2004 Info-ZIP. All rights reserved.
3
.\" See the accompanying file LICENSE, version 2000-Apr-09 or later
4
.\" (the contents of which are also included in unzip.h) for terms of use.
5
.\" If, for some reason, all these files are missing, the Info-ZIP license
6
.\" also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
8
.\" zipgrep.1 by Greg Roelofs.
10
.\" =========================================================================
11
.TH ZIPGREP 1L "22 May 2004" "Info-ZIP"
13
zipgrep \- search files in a ZIP archive for lines matching a pattern
16
\fBzipgrep\fP [\fBegrep_options\fP] \fIpattern\fP
17
\fIfile\fP[\fI.zip\fP] [\fIfile(s)\fP\ .\|.\|.]
18
[\fB\-x\fP\ \fIxfile(s)\fP\ .\|.\|.]
20
.\" =========================================================================
22
\fIzipgrep\fP will search files within a ZIP archive for lines matching
23
the given string or pattern. \fIzipgrep\fP is a shell script and requires
24
\fIegrep\fP(1) and \fIunzip\fP(1L) to function. Its output is identical to
25
that of \fIegrep\fP(1).
27
.\" =========================================================================
31
The pattern to be located within a ZIP archive. Any string or regular
32
expression accepted by \fIegrep\fP(1) may be used.
34
Path of the ZIP archive. (Wildcard expressions for the ZIP archive name are
35
not supported.) If the literal filename is not found, the suffix \fC.zip\fR
36
is appended. Note that self-extracting ZIP files are supported, as with any
37
other ZIP archive; just specify the \fC.exe\fR suffix (if any) explicitly.
39
An optional list of archive members to be processed, separated by spaces.
40
If no member files are specified, all members of the ZIP archive are searched.
41
Regular expressions (wildcards) may be used to match multiple members:
44
matches a sequence of 0 or more characters
46
matches exactly 1 character
48
matches any single character found inside the brackets; ranges are specified
49
by a beginning character, a hyphen, and an ending character. If an exclamation
50
point or a caret (`!' or `^') follows the left bracket, then the range of
51
characters within the brackets is complemented (that is, anything \fIexcept\fP
52
the characters inside the brackets is considered a match).
55
(Be sure to quote any character that might otherwise be interpreted or
56
modified by the operating system.)
57
.IP [\fB\-x\fP\ \fIxfile(s)\fP]
58
An optional list of archive members to be excluded from processing.
59
Since wildcard characters match directory separators (`/'), this option
60
may be used to exclude any files that are in subdirectories. For
61
example, ``\fCzipgrep grumpy foo *.[ch] -x */*\fR'' would search for the
62
string ``grumpy'' in all C source files in the main directory of the ``foo''
63
archive, but none in any subdirectories. Without the \fB\-x\fP
64
option, all C source files in all directories within the zipfile would be
66
.\" =========================================================================
68
All options prior to the ZIP archive filename are passed to \fIegrep\fP(1).
70
.\" =========================================================================
72
\fIegrep\fP(1), \fIunzip\fP(1L), \fIzip\fP(1L), \fIfunzip\fP(1L),
73
\fIzipcloak\fP(1L), \fIzipinfo\fP(1L), \fIzipnote\fP(1L), \fIzipsplit\fP(1L)
75
.\" =========================================================================
77
The Info-ZIP home page is currently at
79
\fChttp://www.info-zip.org/pub/infozip/\fR
83
\fCftp://ftp.info-zip.org/pub/infozip/\fR .
86
.\" =========================================================================
88
\fIzipgrep\fP was written by Jean-loup Gailly.