ScanText v1.01 Manual ScanText is a program that counts the number of lines in a file or directory in which there are occurences of a single word or a string of words. Syntactical note: ``[]'' indicates optional parameters, ``<>'' indicates required parameters, and ``|'' indicates a logical OR. You should not enter any of these characters when you input the command. Definitions: the word ``string'', when used in this manual, means any combination of characters that includes one more more spaces, e.g., "Stephen King". ``word'' means any combination of characters except for the space character, e.g., "King". SYNTAX ScanText runs in two modes: searching a single file for a word or string; and searching a directory for a word or string. These modes are just different enough to require two general command-line sytactical diagrams. The options will be described in more detail after the diagrams. This is the general command-line syntax you must use when searching a single file for a word or string: st [drive:][path] |"" [ - | + ] [ # | l ] 1 2 3 4 And this is the general command-line syntax used for searching a directory for a word or string: st [drive:] |"" [ - | + ] 1 2 3 Options 1: Single file search mode -- enter filename only if in current directory, else include path to the file. Directory search mode -- enter directory to be searched if on current drive, else include drive letter to directory. Note: there must be a backslash (``\'') in the path; otherwise, the program hangs. (Enter CONTROL-C if this happens) 2: Both modes -- if searching for a string, then enclose in quotes. If searching for a word only, quotes may be omitted. Note: is equivalent to "". 3: Both modes -- enter ``-'' for case-insensitive searching (default), or ``+'' for case-sensitive search. 4: Single file search mode -- enter ``#'' to return a count of the number of lines that contain the word or string (default), or ``l'' to return the actual lines in which the word or string occurs. Directory search mode -- no ``l'' option for directory searching. EXAMPLES In the following example, books.txt is a file and \BOOKS is a directory. C:\> st books.txt king C:\> st \BOOKS king Will count the number of lines in which there are occurences of "king" (case-insentive) in books.txt or \BOOKS and display this number. Words that, using these options and if they are present, will add to the count include: "King", "KING", "King's", and "SKing". C:\> st books.txt "king" C:\> st \BOOKS "king" Identical to the previous example. C:\> st books.txt King + C:\> st \BOOKS King + Will identify lines that contain the word "King" in the proper case. Trigger words include: "SKing" and "King's". C:\> st books.txt "Stephen King" C:\> st \BOOKS "Stephen King" Will identify lines containg the phrase "stephen king" (case-insensitive). Trigger phrases include: "stephen king's", "STEPHEN KING", "Stephen King's", and "author--stephen king". C:\> st books.txt king # C:\> st \BOOKS king # Will search for "king" (case-insensitive) and display the number of lines in which this string occurs. (default condition, no need to enter) Note: ``#'' is optional in directory search mode. C:\> st books.txt king l Will display the lines in which the word "king" (case-insensitive) occurs, in addition to the count. C:\> st \BOOKS king l Illegal. Will return an "Options Error" -- line-display is disabled in directory search mode. CREDITS ST - ScanText v1.01 / Copyright (c) 1995 Andrew Tsai & Jawed Karim Programming: Jawed Karim and Andrew Tsai Report bugs in ST.EXE to: Jawed Karim Online help: Copyright (c) 1995 Dan Rogovin Manual: Copyright (c) 1995 Dan Rogovin (20Aug95, Rev. B) Report problems in the manual to: Dan Rogovin Visit one of these World-Wide Web pages: Dan Rogovin: http://www.umn.edu/nlhome/m101/rogo0009/dan.html Jawed Karim: http://www.umn.edu/nlhome/g346/kari0022/jawed.html [The newest version of ScanText is always available on this page]