Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6725 | siemargl | 1 | ZIPGREP(1L) ZIPGREP(1L) |
2 | |||
3 | NAME |
||
4 | zipgrep - search files in a ZIP archive for lines matching a pattern |
||
5 | |||
6 | SYNOPSIS |
||
7 | zipgrep [egrep_options] pattern file[.zip] [file(s) ...] |
||
8 | [-x xfile(s) ...] |
||
9 | |||
10 | DESCRIPTION |
||
11 | zipgrep will search files within a ZIP archive for lines matching the |
||
12 | given string or pattern. zipgrep is a shell script and requires |
||
13 | egrep(1) and unzip(1L) to function. Its output is identical to that of |
||
14 | egrep(1). |
||
15 | |||
16 | ARGUMENTS |
||
17 | pattern |
||
18 | The pattern to be located within a ZIP archive. Any |
||
19 | string or regular expression accepted by egrep(1) may be |
||
20 | used. file[.zip] Path of the ZIP archive. (Wildcard |
||
21 | expressions for the ZIP archive name are not supported.) |
||
22 | If the literal filename is not found, the suffix .zip is |
||
23 | appended. Note that self-extracting ZIP files are sup- |
||
24 | ported, as with any other ZIP archive; just specify the |
||
25 | .exe suffix (if any) explicitly. |
||
26 | |||
27 | [file(s)] |
||
28 | An optional list of archive members to be processed, sep- |
||
29 | arated by spaces. If no member files are specified, all |
||
30 | members of the ZIP archive are searched. Regular expres- |
||
31 | sions (wildcards) may be used to match multiple members: |
||
32 | |||
33 | * matches a sequence of 0 or more characters |
||
34 | |||
35 | ? matches exactly 1 character |
||
36 | |||
37 | [...] matches any single character found inside the |
||
38 | brackets; ranges are specified by a beginning |
||
39 | character, a hyphen, and an ending character. If |
||
40 | an exclamation point or a caret (`!' or `^') fol- |
||
41 | lows the left bracket, then the range of charac- |
||
42 | ters within the brackets is complemented (that is, |
||
43 | anything except the characters inside the brackets |
||
44 | is considered a match). |
||
45 | |||
46 | (Be sure to quote any character that might otherwise be |
||
47 | interpreted or modified by the operating system.) |
||
48 | |||
49 | [-x xfile(s)] |
||
50 | An optional list of archive members to be excluded from |
||
51 | processing. Since wildcard characters match directory |
||
52 | separators (`/'), this option may be used to exclude any |
||
53 | files that are in subdirectories. For example, ``zipgrep |
||
54 | grumpy foo *.[ch] -x */*'' would search for the string |
||
55 | ``grumpy'' in all C source files in the main directory of |
||
56 | the ``foo'' archive, but none in any subdirectories. |
||
57 | Without the -x option, all C source files in all directo- |
||
58 | ries within the zipfile would be searched. |
||
59 | |||
60 | OPTIONS |
||
61 | All options prior to the ZIP archive filename are passed to |
||
62 | egrep(1). |
||
63 | |||
64 | SEE ALSO |
||
65 | egrep(1), unzip(1L), zip(1L), funzip(1L), zipcloak(1L), zip- |
||
66 | info(1L), zipnote(1L), zipsplit(1L) |
||
67 | |||
68 | URL |
||
69 | The Info-ZIP home page is currently at http://www.info- |
||
70 | zip.org/pub/infozip/ or ftp://ftp.info-zip.org/pub/infozip/ . |
||
71 | |||
72 | AUTHORS |
||
73 | zipgrep was written by Jean-loup Gailly. |
||
74 | |||
75 | Info-ZIP 20 April 2009 ZIPGREP(1L) |