home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
util1
/
grepfv2.lzh
/
GREPFV2.DOC
next >
Wrap
Text File
|
1991-04-07
|
3KB
|
90 lines
GREPFV
By Nigel Salt (c) 1991
All rights reserved
GREPFV is a text string searching utility with a difference. It
searches for regular expressions in text files, archived files,
and executable files. It will automatically unarchive ZIP, PAK,
ZOO, LZH, and ARC files providing that you have a copy of FV.COM
and the necessary archive managers in your path.
FV.COM is Vernon Buerg's addon for LIST. It is available on most
BBSs.
The syntax for grepfv is
grepfv "regexp" filepattern[+] tempdir
where
REGEXP is a pattern made up of ASCII characters plus the
following special "wild cards". Enclose the pattern in quotes to
avoid DOS misunderstanding the special characters. Searching for
a backslash poses particular problems because DOS treats it as an
escape character. To look for a backslash you actually have to
specify "\\\\" as the pattern. DOS then translates this to "\\"
which causes grepfv to look for a literal backslash.
All searches are case insensitive
REGULAR EXPRESSIONS:
\ treat next char as literal
. match any single character
* match 0 or more characters
& preceeding expression AND following expression
| preceeding expression OR following expression
FILEPATTERN is a dos type file specification including wildcards.
If you want to search all of the files in a directory then end
the filepattern with a \. If you want to search all of the files
in subdirectories too then add a + to the end of the filepattern.
For example "\ns\" searches all files in the \ns directory,
"\ns\nigel.*" searches all files in the \ns directory that are
called nigel, "\ns\nigel.*+" searches all files called nigel in
the \ns directory and all of its subdirectories.
TEMPDIR should preferably be a RAM disc. It is the location that
grepfv will use to temporarily explode the files in the archives
which it searches.
Examples
1. grepfv "vga" tools.zip f:
Searches all of the files in tools.zip for vga and uses drive f
for temporary files
2. grepfv "cga|vga" \tools\
Searches all files in the directory \tools of the current drive
for cga or vga using the current drive for temporary files
because no alternative was specified. Note the trailing backslash
on tools; without it grepfv would look for a file called tools in
the root directory.
3. grepfv "cga&vga" \tools\+
Searches all of the files in tools and its subdirectories for
line which contain both the word cga and vga.
Copyright
---------
grepfv.zip may be distributed freely as long as this document
is left unchanged.
If you keep it you should register it by sending a donation of
not less than £10 to me. Please honour this arrangement I am in
dire need of an upgrade for my development machine.
Corporate users can obtain a site license for £50
Overseas registration costs a minimum of £20 because my bank
charges £10 to cash a foreign cheque.
Nigel Salt
25 Lower Station Rd
Crayford
Kent
DA1 3PY
Phone 0322 553260
CIX ID nao@cix.complink.co.uk
RAX Nigel Salt on node 2:440/52.49