home *** CD-ROM | disk | FTP | other *** search
- ZGREP
- by
- Douglas E. MacLean
- 2200 Ocean Ave. Apt 6B
- Brooklyn, New York 11229
-
- SysOp of The Vernon BBS (201) 827-6441
-
-
- How many times did you ever want to search through a directory full
- of ZIP files but you couldn't exactly remember the name of the file you
- wanted? With ZGrep you can bring the power of Unix style regular
- expressions to assist in your search. Or perhaps you would like to
- only unzip a series of files with certain characters in the name.
- ZGrep is just the utility to use.
-
- Regular expressions are search patterns were certain special character
- are expanded to limit and guide the search. ZGrep uses these regular
- expressions to search ZIP and self extracting EXE files for exactly the
- files you want. The zip program is limited to the use of DOS wildcards
- to perform its operations. Now with ZGrep you can expand the
- usefulness of this powerful tool.
-
- The use of Zgrep is very easy. People familiar with the uniz grep
- program will be abile to use it right away. The command line is as
- follows.
-
- zgrep <-flags> regexp<,regexp...>|#refile <zipfile{.zip|.exe}|@filelist
-
- Where flags are the various options to produce different style
- listings, regexp are the regular expression and filelist is the list of
- files to search. Multiple regular expressions are separated by a
- comma.
-
- The options are:
-
-
- -l: full listing
- -z: list only zip file name
- -f: list only file name
- -i: list only files/zips that do not match
- -v: verbose mode: show stats
- -1 check for version 1.02 exe file
- -2: check for version 0.92 exe files
- -h: help with regular expressions
- -u<path> unzip files to path, use '.' for current dir
- -a: ask before inzipping file
-
-
-
- -l full listing
-
- This option provides the full path of the zip file where the match
- occurred. The time, date and size of the original files are also
- displayed. This is the default mode.
-
- -z zip files only
-
- This options only displays the name of the zip files that contain
- matches for the regular expression.
-
- -f files only
-
- This will list the names of the files that match. On information about
- which zip file are displayed.
-
- -i inverse match
-
- This will invert the selection displaying only those files that don't
- match the regular expression.
-
- -n name list mode
-
- This will provide the name of the zip file and the file that matches
- the selection criteria.
-
- -v verbose mode
-
- This will display additional information such as the date, time and
- size of the matching files.
-
- -2 PKZ092 mode (self extraction)
-
- This options permits ZGrep to work on self extracting exe files created
- by PKZip versions prior to the 1.0x versions.
-
- Self extracting exe files from versions 1.10 is the default setting.
-
- -1 PKZ102 mode (self extraction)
-
- This options permits ZGrep to work on self extracting exe files created
- by PKZip versions 1.01 and 1.02
-
- Self extracting exe files from versions 1.10 is the default setting.
-
- -h help display
-
- This will display a chart of the options for ZGrep.
-
- -u<path> unzip located files
-
- This will unzip the located files to the specified path. The path
- should appear directly after the u and may include a drive.
-
- zgrep -ud:\work ^[A-D] *.*
-
- Will unzip all files that begin with the letter A through D to the D
- drives work directory.
-
- -a ask first
-
- This option will prompt you for a 'y' or 'n' to determine if the
- displayed file show be unzipped.
-
-
- With version 2.0 you can now specify the files to search in a file.
- The file must be proceeded by the character '@' such as:
-
- zgrep ^[A-D],TXT$ @filelist
-
- You can use any combination of wildcards, filelists and filenames to
- designate the search list:
-
- zgrep ^[A-D],TXT$ zippy.zip @filelist a:programs
-
- Notice that if the extent zip is not specified it is assumed.
-
- With version 2.1 there is also the ability to obtain the regular expressions
- from a file. The file must be preceeded by the character '#':
-
- zgrep #express.lst @files
-
- The expression file and search file should have one entry per line. There
- may be mulitple search files but only one expression file.
-
-
- You can select your own defaults by setting the DOS environment variable ZGREP.
- For example,
-
- set ZGREP=nv
-
- Will default to a verbose listing of zip and file names.
-
- You can also use zgrep to extract files from different zip files:
-
- zgrep -u. EXE$,DOC$ a:v9n04.zip d:\zipfiles\list73a.zip
-
- This command will extract to the current directory all *.DOC and *.EXE files
- from the listed zip files.
-
- History
-
- *
- * Rev 2.1 17 Mar 1990 17:44:15 DEM
- * Added ability to obtain regular expressions from a file.
- *
- * Rev 2.0 16 Mar 1990 20:23:00 DEM
- * Added ability to use a list file to designate search files.
- * Corrected error encounted when file specified does not exist
- * Thanks to John McNamara or Mac's Place BBS (919) 891-1111
- * who sugested the filelist idea.
- *
- * Rev 1.6 14 Mar 1990 09:38:00 DEM
- * The filename extent now defulats to ZIP if none is provided.
- * You can use a command like
- * zgrep ^ZGREP a:programs
- * to refer to a:programs.zip
- *
- * Rev 1.5 23 Mar 1990 10:04:32 DEM
- * Added code to support PKZ110 new EXE format.
- *
- * Rev 1.4 01 Mar 1990 15:47:16 DEM
- * Removed code that can be supplied from personal library
- * Removed redundant external prototyping
- * Added version number in usage display
- *
- * Rev 1.3 02 Feb 1990 17:18:24 DEM
- * Corrected code to permit multiple option flags
- * Added environmental defaults
- * First offical public release
- *
- * Rev 1.2 02 Feb 1990 13:29:50 DEM
- * Added code to unzip located files to given path
- * Added call to getopt()
- *
- * Rev 1.1 31 Jan 1990 22:32:52 DEM
- * Added online help for regular expressions
- *
- * Rev 1.0 31 Jan 1990 16:20:10 DEM
- * Initial revision.
- */
-
-