home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 6 File
/
06-File.zip
/
findx.zip
/
FIND2.DOC
next >
Wrap
Text File
|
1989-11-28
|
6KB
|
117 lines
-------------------------------------------------------------------------------
***************** ************ ******** ****** *********
***************** ************ ******** ****** ***********
**** **** **** **** ** **** ****
**** **** ** ** ** **** ****
********* **** ** ** ** **** ****
**** **** ** ** ** **** ****
**** **** ** **** **** ****
******* ************ ****** ******** ***********
******* ************ ****** ******** *********
-------------------------------------------------------------------------------
FindX: This is an enhanced version of the original OS/2 FIND filter. With this
version, you may search any number of files for a given string pattern
specified on the command line (see below). In addition, a number of run
time switches can be used:
o [/v] lists all lines NOT containing a string pattern match
o [/c] reports only number of string pattern matches in file
o [/n] lists line number of line with string pattern match
o [/s] makes pattern search case sensitive (case insensitive is
default)
o [/a] activates a verbose reporting mode. Normally, if a file
contains no matches, nothing is reported to the user. In
this verbose mode, All file processing is reported.
o [/b] allows searching binary files. The output is reported in
byte format (HEX and ASCII) iso line format. The /n and
/v options are disabled if this option is selected.
Usage: FindX [/v][/c][/n][/s][/a][/b] "pattern" [<filespec> <filespec> ... ]
(items in square brackets are optional)
where <filespec> is a file specification that may contain wildcards and
paths of the form:
[d:][path]filename[.ext]
Improvements over the original OS/2 filter include:
o Command line parsing has been improved so that parameters can be
entered in any order the user wishes (i.e FindX/N/S "PATTERN" FILE.EXT
or FindX/N FILE.EXT "PATTERN"/S are both acceptable).
o File specifications may include wildcards (? or *).
o String patterns may include wildcards (via [?] character).
o Pattern matching is case insensitive by default. Case sensitivity can
be restored via the [/s] switch.
o Verbose reporting mode option via the [/a] switch. Normally files with
no matches are not reported to the user. In this verbose mode all file
processing is reported.
o Ability to search binary files via the [/b] switch (output will be in
DEBUG style HEX format). The [/v] and [/n] switches are disabled for
this option.
o Ability to search for special characters (via [\] char).
o Properly treats tabs as "white space" on command line.
o Checks for successful write to STDOUT and reports message if not
(useful when used in redirection or piping and run out of disk space).
o Retains use of "STD" I/O devices to support redirection.
Notes: If a <filespec> was not specified, it is assumed that the input to this
program has been redirected, and thus reads its input from the 'Standard
Input Device'. If there was no redirection, the program will detect this
and report a 'Usage' error message.
The specified string pattern is a normal ASCII string with the following
exceptions:
o [\b] will match a <BACKSPACE> character [^H]
o [\f] will match a <FORMFEED> character [^L]
o [\n] will match a <CR><LF> pair (NEWLINE) [^M][^J]
o [\r] will match a <CR> character [^M]
o [\t] will match a <TAB> character [^I]
o [\\] will match a <BACKSLASH> character.
o [\] followed by any character other than the above will match
that character (i.e. [\?] or [\"] etc).
o [?] is a positional wildcard. A [?] at any position in the
string will match any character at that position.
Note also that to maintain compatibility with the original FIND filter,
consecutive double quotes are treated the same way as [\"] - they are
read as a single string character and not as a string delimiter.
Error messages:
o 'Usage: FindX [/v][/c][/n][/s][/a][/b] "pattern" [<filespec> ... ]'
Improper command line syntax. This message reports proper usage.
o 'FindX: Syntax error in string pattern'
Improper string specification (missing quote[s] in string).
o 'FindX: File not found <filnam.ext>'
Specified file not found or could not open.
o 'FindX: Read error in <filnam.ext>'
Encountered a read error while reading <filnam.ext>.
o 'FindX: Invalid switch <s>'
Invalid run time switch was specified on the command line.
o 'FindX: Error writing to STDOUT'
This message is usually reported if STDOUT has been redirected to
file and there is no more disk space.
-------------------------------------------------------------------------------
FindX (OS/2) Copyright (c) 1989 4844 King Edward
Version 1.4 Montreal, Quebec
Fulvio J. Castelli November 1st, 1989 CANADA H4V 2J6
-------------------------------------------------------------------------------
If you find this utility in any way useful, I kindly request a contribution of
$15.00 (U.S.) sent to the above name and address. I am distributing FindX under
the 'ShareWare' philosophy and rely strictly on user support to maintain FindX.
-------------------------------------------------------------------------------