zipgrep.txt 3.3 KB

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