home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / COMPRESS / ZGREP21.ZIP / ZGREP.TXT < prev   
Encoding:
Text File  |  1990-04-17  |  6.3 KB  |  194 lines

  1.                                  ZGREP
  2.                                    by
  3.                            Douglas E. MacLean
  4.                          2200 Ocean Ave. Apt 6B
  5.                         Brooklyn, New York 11229
  6.  
  7.                  SysOp of The Vernon BBS (201) 827-6441
  8.                            
  9.  
  10.     How many times did you ever want to search through a directory full
  11. of ZIP files but you couldn't exactly remember the name of the file you
  12. wanted?  With ZGrep you can bring the power of Unix style regular
  13. expressions to assist in your search.  Or perhaps you would like to
  14. only unzip a series of files with certain characters in the name. 
  15. ZGrep is just the utility to use.
  16.  
  17. Regular expressions are search patterns were certain special character
  18. are expanded to limit and guide the search.  ZGrep uses these regular
  19. expressions to search ZIP and self extracting EXE files for exactly the
  20. files you want.  The zip program is limited to the use of DOS wildcards
  21. to perform its operations.  Now with ZGrep you can expand the
  22. usefulness of this powerful tool.
  23.  
  24. The use of Zgrep is very easy.  People familiar with the uniz grep
  25. program will be abile to use it right away.  The command line is as
  26. follows.
  27.  
  28.         zgrep <-flags> regexp<,regexp...>|#refile <zipfile{.zip|.exe}|@filelist
  29.  
  30. Where flags are the various options to produce different style
  31. listings, regexp are the regular expression and filelist is the list of
  32. files to search.  Multiple regular expressions are separated by a
  33. comma.
  34.  
  35. The options are:
  36.  
  37.  
  38.         -l:         full listing            
  39.         -z:         list only zip file name
  40.         -f:         list only file name
  41.         -i:         list only files/zips that do not match
  42.         -v:         verbose mode: show stats
  43.         -1          check for version 1.02 exe file
  44.         -2:         check for version 0.92 exe files
  45.         -h:         help with regular expressions
  46.         -u<path>    unzip files to path, use '.' for current dir
  47.         -a:         ask before inzipping file
  48.  
  49.  
  50.  
  51.         -l  full listing
  52.  
  53. This option provides the full path of the zip file where the match
  54. occurred.  The time, date and size of the original files are also
  55. displayed.  This is the default mode.
  56.  
  57.         -z  zip files only
  58.  
  59. This options only displays the name of the zip files that contain
  60. matches for the regular expression.
  61.  
  62.         -f  files only
  63.  
  64. This will list the names of the files that match.  On information about
  65. which zip file are displayed.
  66.  
  67.         -i  inverse match
  68.  
  69. This will invert the selection displaying only those files that don't
  70. match the regular expression.
  71.  
  72.         -n  name list mode
  73.  
  74. This will provide the name of the zip file and the file that matches
  75. the selection criteria.
  76.  
  77.         -v  verbose mode
  78.  
  79. This will display additional information such as the date, time and
  80. size of the matching files.  
  81.  
  82.         -2  PKZ092 mode (self extraction)
  83.  
  84. This options permits ZGrep to work on self extracting exe files created
  85. by PKZip versions prior to the 1.0x versions.
  86.  
  87. Self extracting exe files from versions 1.10 is the default setting.
  88.  
  89.         -1  PKZ102 mode (self extraction)
  90.  
  91. This options permits ZGrep to work on self extracting exe files created
  92. by PKZip versions 1.01 and 1.02
  93.  
  94. Self extracting exe files from versions 1.10 is the default setting.
  95.  
  96.         -h  help display
  97.  
  98. This will display a chart of the options for ZGrep.
  99.  
  100.         -u<path>    unzip located files
  101.  
  102. This will unzip the located files to the specified path.  The path
  103. should appear directly after the u and may include a drive.
  104.  
  105.             zgrep   -ud:\work   ^[A-D]  *.*
  106.  
  107. Will unzip all files that begin with the letter A through D to the D
  108. drives work directory.
  109.  
  110.         -a      ask first
  111.  
  112. This option will prompt you for a 'y' or 'n' to determine if the
  113. displayed file show be unzipped.
  114.  
  115.  
  116. With version 2.0 you can now specify the files to search in a file.
  117. The file must be proceeded by the character '@' such as:
  118.  
  119.         zgrep ^[A-D],TXT$ @filelist
  120.  
  121. You can use any combination of wildcards, filelists and filenames to
  122. designate the search list:
  123.  
  124.         zgrep ^[A-D],TXT$ zippy.zip @filelist a:programs
  125.  
  126. Notice that if the extent zip is not specified it is assumed.
  127.  
  128. With version 2.1 there is also the ability to obtain the regular expressions
  129. from a file.  The file must be preceeded by the character '#':
  130.  
  131.         zgrep #express.lst  @files
  132.  
  133. The expression file and search file should have one entry per line.  There
  134. may be mulitple search files but only one expression file.
  135.  
  136.  
  137. You can select your own defaults by setting the DOS environment variable ZGREP.
  138. For example,
  139.  
  140.             set ZGREP=nv
  141.  
  142. Will default to a verbose listing of zip and file names.
  143.  
  144. You can also use zgrep to extract files from different zip files:
  145.  
  146.             zgrep -u. EXE$,DOC$ a:v9n04.zip d:\zipfiles\list73a.zip
  147.  
  148. This command will extract to the current directory all *.DOC and *.EXE files
  149. from the listed zip files.
  150.  
  151.                             History
  152.  
  153.  *
  154.  *    Rev 2.1   17 Mar 1990 17:44:15   DEM
  155.  * Added ability to obtain regular expressions from a file.
  156.  *
  157.  *    Rev 2.0   16 Mar 1990 20:23:00   DEM
  158.  * Added ability to use a list file to designate search files.
  159.  * Corrected error encounted when file specified does not exist
  160.  * Thanks to John McNamara or Mac's Place BBS (919) 891-1111
  161.  * who sugested the filelist idea.
  162.  *
  163.  *    Rev 1.6   14 Mar 1990 09:38:00   DEM
  164.  * The filename extent now defulats to ZIP if none is provided.
  165.  * You can use a command like
  166.  *          zgrep ^ZGREP  a:programs
  167.  * to refer to a:programs.zip
  168.  * 
  169.  *    Rev 1.5   23 Mar 1990 10:04:32   DEM
  170.  * Added code to support PKZ110 new EXE format.
  171.  * 
  172.  *    Rev 1.4   01 Mar 1990 15:47:16   DEM
  173.  * Removed code that can be supplied from personal library
  174.  * Removed redundant external prototyping
  175.  * Added version number in usage display
  176.  * 
  177.  *    Rev 1.3   02 Feb 1990 17:18:24   DEM
  178.  * Corrected code to permit multiple option flags
  179.  * Added environmental defaults
  180.  * First offical public release
  181.  * 
  182.  *    Rev 1.2   02 Feb 1990 13:29:50   DEM
  183.  * Added code to unzip located files to given path
  184.  * Added call to getopt()
  185.  * 
  186.  *    Rev 1.1   31 Jan 1990 22:32:52   DEM
  187.  * Added online help for regular expressions
  188.  * 
  189.  *    Rev 1.0   31 Jan 1990 16:20:10   DEM
  190.  * Initial revision.
  191. */
  192.  
  193.  
  194.