home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
find32.zip
/
FIND32.DOC
next >
Wrap
Text File
|
1995-09-09
|
8KB
|
226 lines
##############################################################################
## $Workfile:: FIND32.DOC $
## ===========================================================================
## Copyright (c) kirchner SOFT. All rights reserved.
## ---------------------------------------------------------------------------
## TASK :: documentation for FIND32.
##
## ---------------------------------------------------------------------------
## AUTHOR :: Mario Semo
## CREATED :: 93-02-14
## ---------------------------------------------------------------------------
## NOTES ::
## ===========================================================================
## HISTORY :: $Author:: MS $$Revision:: 1.0 $
## $Modtime:: 12 Jun 1995 14:36:50 $
## ---------------------------------------------------------------------------
## $Log:: K:/LC32/L.ARC/UTIL/FIND32.DO$ $
##
## Rev 1.0 12 Jun 1995 15:26:20 MS new
##
##############################################################################
╔═══════════════════════════════════╗
║ ║
║ FIND32 ║
║ A ║
║ FreeWare ║
║ 32 bit Text Search Util ║
║ for OS/2 2.x & 3.x ║
║ by Mario Semo ║
║ V1.43 ║
║ 1995-03-06 ║
╚═══════════════════════════════════╝
Mario Semo:
FIDO : 2:310/14.11@fidonet
EMAIL: 100414.1025@compuserve.com
CIS : 100414,1025
History :
14.2.93 : Ver 1.0 initial version
21.2.93 : Ver 1.1 file find feature new
23.2.93 : Ver 1.11 -- option, threads optimized
07.4.93 : Ver 1.2 corrected a bug in output thread (data overrun).
23.8.93 : Ver 1.3 multiple File Masks, Ctrl-Break Handling.
04.4.94 : Ver 1.4 FindFirst options implemented (-1, -1f)
fixed a bug with '?' in pattern string. (looping)
14.12.94: Ver 1.41 now shows only files where text is found (now FASTER!).
now allows multiple instances run at same time (hope so).
24.02.95: Ver 1.42 -0 option implemented. (faster!)
FIND32 environment string implemented. -v option
06.03.95: Ver 1.43 fixed bug introduced in 1.42. (-1a always active)
09.09.95: added EPM interface doc here.
Highlights:
-----------
.) High Speed Scanning Algorithm
.) Multithreaded (4 threads for DiskScan,FileI/O,TextScan,VioOut)
.) Allows for upto 1 ScanError (Substitution/Insert/Delete Errors)
eg: 1234 matches 12a4 in 1 substitution
1234 matches 12a34 with 1 insert
1234 matches 124 with 1 delete
configurable !
.) Allows Scanning of binary/ASCII Files
.) Allows for Subdirectory recursion
.) PatternString can be given ASCII, Hex, or via regular expression
eg: ASCII : "1234"
HEX : 0x50aa00b4
Pattern : a-zA-Z|0-9|?|Ee|?^0-9
(means: pos1 : is either a lower case or upper case char
pos2 : is a number digit
pos3 : any char
pos4 : either E or e
pos5 : anything but a number digit
.) Specifing Pattern String in any of the ways, allowing for Errors
does NOT result in a performance degradiation.
(except for different startup code, the scanning is independend of these
features).
.) imbedded FileFind Feature
.) wildcard for DriveLetter (*:)
Restrictions:
-------------
The Length of the Pattern String must be <= 32.
Performance Results
-------------------
Find32 : This utility
Find16 : just a different Public Domain FAPI Text Search
FindOS2: The OS/2 Find Program
scanning a 1mb text ascii file for the string 12221 (VDISK)
Find32 : 5438ms
Find16 : 11344ms
FindOS2 : 26250ms
scanning 111 files with 1333141 bytes (FAT)
Find32 : 8594ms
Find16 : 14469ms
FindOS2 : 37875ms (via: for %i in (*.c) do ....)
Usage
-----
Find32 Options PatternString FileMask
Options:
Option delimiter is either - or /
Options can be given case independent.
-1f: find first in each file only
if the string is found in a file, the processing of the file stops
-1 : find first only
after the first match, the whole processing stops
-e : exact match only (default)
-s : 1 substitution allowed
-f : 1 substitution/insert/delete allowed
-r : recurse subdirectories
-i : ignore case
-b : binary file scan
-t : Totals only (only for -- scan option)
-? : simple online help.
-h : simple online help.
-a : display all file names while scanning
-- : perform only a FileFind
sample: find32 -- -r *:\cmd.exe
searches all drives, all pathes for cmd.exe
-0 : display only the files, not the lines where data is found.
(disables -a and enables -1f)
-v : igonre environment string, even if defined.
Pattern Specification
ASCII : PatternString
HEX : -xString : hex Search String, eg: -x4500ff
EXPRESSION : "-pPatternExpression"
You can specify only ONE of these pattern.
ASCII : If you want to include special chars (blank, |, ... in the
string, you must enclose the string in "...".
You cant search for DoubleQuotationMarks.
HEX : You have to use 2 hex digits for each position.
EXPRESSION : The Expression must be enclosed in "..."
You specify a simple expression for each position and
split the different positions with the '|' character.
List : List | ElemDef
ElemDef
ElemDef : ElemDef SimpleElem
SimpleElem
SimpleElem: char
char-char
^char
^char-char
?
\char
meaning of the SimpleElems:
char : allows the char for the position
char-char : allows all chars in the given range for
the position
^char : forbids char for the position
NOTE : this enables NO character for the position.
^char-char: forbids all chars in the given range.
? : enables ALL chars for the position
\char : enables char for the position, this
can be used to enable -,^,\,|,? characters.
Samples for SimpleElem:
0-9^4a-z : enables 0-9
disables 4
enables a-z
Sample for the complete Expression:
"-p?^a-z^A-Z|a-zA-z|?|?^||0-9"
matches eg: 3a|^4 exact.
FileMask:
The FileMask has the following form:
[x:][path]mask
sample:
\test\mydir\*.c
c:*.obj
*:\* ... all files on all drives (except floppy drives),
... when given with -r.
"a\x b .. c..d" ... a HPFS file name.
If no file mask is specified, a default of "*" is used.
There can be more than 1 FileMask given.
eg: find32 hallo c\*.c h\*.h
find32 -- -r mak*.* *.mak
(better: find32 -- -r *mak* )
You can define some of the command line options in an environment variable
'FIND32'. These options are:
0 1 1f a b e f ? i r s
sample:
SET FIND32=-i-r-0
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EPM interface
======= f32.e ========
defmain
parse arg arguments
dos_command('find32 ' arguments)
return
=======================
etpm f32.e
mv f32.ex -> epm(beta) directory
Mario.