home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 6 File / 06-File.zip / st102a.zip / ST.TXT < prev   
Text File  |  1995-08-29  |  5KB  |  152 lines

  1. ScanText v1.02a Manual
  2.  
  3.  
  4. ScanText is a program that counts the number of lines in a file or directory
  5. in which there are occurences of a single word or a string of words.
  6.  
  7.  
  8. Syntactical note: ``[]'' indicates optional parameters, ``<>'' indicates
  9. required parameters, and ``|'' indicates a logical OR.  You should not enter
  10. any of these characters when you input the command.
  11.  
  12. Definitions: the word ``string'', when used in this manual, means any
  13. combination of characters that includes one more more spaces, e.g.,
  14. "Stephen King".  ``word'' means any combination of characters except for the
  15. space character, e.g., "King".
  16.  
  17.  
  18. SYNTAX
  19.  
  20. ScanText runs in two modes: searching a single file for a word or string;
  21. and searching a directory for a word or string.  These modes are just
  22. different enough to require two general command-line sytactical diagrams.
  23. The options will be described in more detail after the diagrams.
  24.  
  25. This is the general command-line syntax you must use when searching a single
  26. file for a word or string:
  27.  
  28. st [drive:][path]<filename>  <word>|"<string>"  [ - | + ]  [ # | l ]
  29.           1                       2                3          4    
  30.  
  31. And this is the general command-line syntax used for searching a directory
  32. for a word or string:
  33.  
  34. st [drive:]<path>  <word>|"<string>"  [ - | + ]
  35.          1              2                3    
  36.  
  37. Options
  38.  
  39. 1: Single file search mode -- enter filename only if in current directory,
  40.    else include path to the file.
  41.    Directory search mode -- enter directory to be searched if on current
  42.    drive, else include drive letter to directory.
  43.    
  44. 2: Both modes -- if searching for a string, then enclose in quotes.  If
  45.    searching for a word only, quotes may be omitted.  Note: <word> is
  46.    equivalent to "<word>".
  47.  
  48. 3: Both modes -- enter ``-'' for case-insensitive searching (default), or
  49.    ``+'' for case-sensitive search.
  50.  
  51. 4: Single file search mode -- enter ``#'' to return a count of the number of
  52.    lines that contain the word or string (default), or ``l'' to return the
  53.    actual lines in which the word or string occurs.
  54.    Directory search mode -- no ``l'' option for directory searching.
  55.  
  56.  
  57. EXAMPLES
  58.  
  59. In the following example, books.txt is a file and \BOOKS is a directory.
  60.  
  61. C:\> st books.txt king
  62. C:\> st \BOOKS    king
  63.  
  64. Will count the number of lines in which there are occurences of "king"
  65. (case-insentive) in books.txt or \BOOKS and display this number.  Words
  66. that, using these options and if they are present, will add to the count
  67. include: "King", "KING", "King's", and "SKing".
  68.  
  69. C:\> st books.txt "king"
  70. C:\> st \BOOKS    "king"
  71.  
  72. Identical to the previous example.
  73.  
  74. C:\> st books.txt King +
  75. C:\> st \BOOKS    King +
  76.  
  77. Will identify lines that contain the word "King" in the proper case.
  78. Trigger words include: "SKing" and "King's".
  79.  
  80. C:\> st books.txt "Stephen King"
  81. C:\> st \BOOKS    "Stephen King"
  82.  
  83. Will identify lines containg the phrase "stephen king" (case-insensitive).
  84. Trigger phrases include: "stephen king's", "STEPHEN KING", "Stephen King's",
  85. and "author--stephen king".
  86.  
  87. C:\> st books.txt king #
  88. C:\> st \BOOKS    king #
  89.  
  90. Will search for "king" (case-insensitive) and display the number of lines in
  91. which this string occurs. (default condition, no need to enter)
  92. Note: ``#'' is optional in directory search mode.
  93.  
  94. A) C:\> st books  king
  95. B) C:\> st \books king
  96.  
  97. Will search subdirectory C:\books for files that contain "king" (any case),
  98. and display the number of lines in which it occurs. Syntax A and B are 
  99. identical. If the search directory is a subdirectory of the current one,
  100. a backslash is not necessary.
  101.  
  102. C:\> st books.txt king l
  103.  
  104. Will display the lines in which the word "king" (case-insensitive) occurs,
  105. in addition to the count.
  106.  
  107. C:\> st \BOOKS    king l
  108.  
  109. Illegal.  Will return an "Options Error" -- line-display is disabled in
  110. directory search mode.
  111.  
  112.  
  113. CREDITS
  114.  
  115. ST - ScanText / Copyright (c) 1995 Andrew Tsai & Jawed Karim
  116.  
  117. Programming:  
  118.               (base) : Andrew Tsai & Jawed Karim
  119.      
  120.      (added options, : Jawed Karim
  121.      path support  )
  122.  
  123. Report bugs in ST.EXE to:  Jawed Karim <kari0022@gold.tc.umn.edu>
  124.  
  125. Online help:  Copyright (c) 1995 Dan Rogovin
  126. Manual:  Copyright (c) 1995 Dan Rogovin (25Aug95, rev C)
  127. Report problems in the manual to:  Dan Rogovin <rogo0009@maroon.tc.umn.edu>
  128.  
  129. Visit one of these World-Wide Web pages:
  130.  
  131. Dan Rogovin:  http://www.umn.edu/nlhome/m101/rogo0009/dan.html
  132.  
  133. Jawed Karim:  http://www.umn.edu/nlhome/g346/kari0022/jawed.html
  134. [The newest version of ScanText is always available on this page]
  135.  
  136.  
  137. VERSION HISTORY
  138.  
  139. 1.02a: Minor case sensitivity bug in [drive]:\[path] fixed.
  140.        Improved documentation.
  141. 1.02 : Fixed nasty bug, wouldn't let user scan single files :-/
  142.        completely rewrote half of code.
  143. 1.01b: Fixed directory bug, alternative drive wouldn't switch back to
  144.        default directory.
  145.        Changed output, looks better.
  146. 1.01a: Fixed alternate drives bug; before, if entered would scan c:\
  147. 1.01:  New feature: let's user search for strings! " ... "      
  148.        New feature: entire paths can now be scanned.
  149. 1.00:  First release version.  Visible bugs worked out of 0.9x
  150. 0.9x:  Beta versions; various options added
  151.  
  152.