home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / findx.zip / FIND2.DOC next >
Text File  |  1989-11-28  |  6KB  |  117 lines

  1. -------------------------------------------------------------------------------
  2. *****************      ************      ********    ******      *********
  3. *****************      ************      ********    ******      ***********
  4.  ****        ****          ****            ****        **         ****    ****
  5.  ****                      ****            **  **      **         ****     ****
  6.  *********                 ****            **    **    **         ****     ****
  7.  ****                      ****            **      **  **         ****     ****
  8.  ****                      ****            **        ****         ****    ****
  9. *******                ************      ******    ********      ***********
  10. *******                ************      ******    ********      *********
  11. -------------------------------------------------------------------------------
  12. FindX: This is an enhanced version of the  original OS/2 FIND filter. With this
  13.        version, you may search any  number of files for a  given string pattern
  14.        specified on the command line (see below).  In addition, a number of run
  15.        time switches can be used:
  16.  
  17.         o [/v] lists all lines NOT containing a string pattern match
  18.         o [/c] reports only number of string pattern matches in file
  19.         o [/n] lists line number of line with string pattern match
  20.         o [/s] makes pattern search case sensitive (case insensitive is
  21.                default)
  22.         o [/a] activates a verbose reporting mode.  Normally, if a file
  23.                contains no matches, nothing is reported to the user. In
  24.                this verbose mode, All file processing is reported.
  25.         o [/b] allows searching binary files. The output is reported in
  26.                byte format (HEX and ASCII) iso line format.  The /n and
  27.                /v options are disabled if this option is selected.
  28.  
  29.  
  30. Usage: FindX [/v][/c][/n][/s][/a][/b] "pattern" [<filespec> <filespec> ... ]
  31.  
  32.        (items in square brackets are optional)
  33.  
  34.        where  <filespec> is a file specification that may contain wildcards and
  35.        paths of the form:
  36.  
  37.        [d:][path]filename[.ext]
  38.  
  39.     
  40. Improvements over the original OS/2 filter include:
  41.     
  42.        o Command  line  parsing  has been  improved so  that  parameters can be
  43.      entered in any order the user wishes (i.e FindX/N/S "PATTERN" FILE.EXT
  44.      or FindX/N FILE.EXT "PATTERN"/S are both acceptable).
  45.        o File specifications may include wildcards (? or *).
  46.        o String patterns may include wildcards (via [?] character).
  47.        o Pattern matching is case insensitive by default.  Case sensitivity can
  48.      be restored via the [/s] switch.
  49.        o Verbose reporting mode option via the [/a] switch. Normally files with
  50.          no matches are not reported to the user. In this verbose mode all file
  51.          processing is reported.
  52.        o Ability to search binary files via the [/b] switch  (output will be in
  53.      DEBUG style  HEX format).  The [/v] and [/n] switches are disabled for
  54.      this option.
  55.        o Ability to search for special characters (via [\] char).
  56.        o Properly treats tabs as "white space" on command line.
  57.        o Checks for  successful  write to  STDOUT  and    reports  message if not
  58.      (useful when used in redirection or piping and run out of disk space).
  59.        o Retains use of "STD" I/O devices to support redirection.
  60.  
  61.  
  62.  
  63. Notes: If a <filespec> was not specified,  it is assumed that the input to this
  64.        program has been redirected, and thus reads its input from the 'Standard
  65.        Input Device'. If there was no redirection, the program will detect this
  66.        and report a 'Usage' error message.
  67.  
  68.        The specified string pattern is a normal ASCII string with the following
  69.        exceptions:
  70.  
  71.         o [\b] will match a <BACKSPACE> character   [^H]
  72.         o [\f] will match a <FORMFEED> character    [^L]
  73.         o [\n] will match a <CR><LF> pair (NEWLINE) [^M][^J]
  74.         o [\r] will match a <CR> character        [^M]
  75.         o [\t] will match a <TAB> character        [^I]
  76.         o [\\] will match a <BACKSLASH> character.
  77.         o [\] followed by any character other than the above will match
  78.               that character (i.e. [\?] or [\"] etc).
  79.         o [?] is a positional wildcard.  A  [?]  at any position in the
  80.               string will match any character at that position.
  81.  
  82.        Note also that to maintain compatibility with the original  FIND filter,
  83.        consecutive double quotes are treated the same way as  [\"]  -  they are
  84.        read as a single string character and not as a string delimiter.
  85.  
  86.  
  87. Error messages:
  88.  
  89.        o 'Usage: FindX [/v][/c][/n][/s][/a][/b] "pattern" [<filespec> ... ]'
  90.       Improper command line syntax. This message reports proper usage.
  91.  
  92.        o 'FindX: Syntax error in string pattern'
  93.       Improper string specification (missing quote[s] in string).
  94.  
  95.        o 'FindX: File not found <filnam.ext>'
  96.       Specified file not found or could not open.
  97.  
  98.        o 'FindX: Read error in <filnam.ext>'
  99.       Encountered a read error while reading <filnam.ext>.
  100.  
  101.        o 'FindX: Invalid switch <s>'
  102.       Invalid run time switch was specified on the command line.
  103.  
  104.        o 'FindX: Error writing to STDOUT'
  105.       This message is usually reported if STDOUT has been redirected to
  106.       file and there is no more disk space.
  107.  
  108. -------------------------------------------------------------------------------
  109. FindX (OS/2)            Copyright (c) 1989               4844 King Edward
  110. Version 1.4                               Montreal, Quebec    
  111. Fulvio J. Castelli        November 1st, 1989               CANADA   H4V 2J6
  112. -------------------------------------------------------------------------------
  113. If you find this utility in any way useful,  I kindly request a contribution of
  114. $15.00 (U.S.) sent to the above name and address. I am distributing FindX under
  115. the 'ShareWare' philosophy and rely strictly on user support to maintain FindX.
  116. -------------------------------------------------------------------------------
  117.