home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / FGREP.ZIP / FGREP.DOC next >
Text File  |  1991-02-15  |  29KB  |  731 lines

  1.                                    FGREP 2.00
  2.                                    ----------
  3.  
  4.         "|" denotes changes in the recent versions.
  5.  
  6.  
  7.         Purpose
  8.         -------
  9.         FGREP (Fast GREP) is a small utility that can be used to find
  10.         strings of characters in ASCII text files, and arbitrary
  11.         sequences of bytes in other files.  String search capabilities
  12.         are not extensive (no regular expressions), but FGREP is small
  13.         and very, very fast.  FGREP is intended to replace the FIND
  14.         filter with something faster and more flexible.
  15.  
  16.         Version 2 of FGREP is the first version to come in both DOS and
  17.         OS/2 versions.  It also adds a recursive (subdirectory) search
  18.         feature that allows you to search an entire directory tree
  19.         with one command, and a feature to display only the matched
  20.         text (rather than the line containing the matched text).
  21.  
  22.         UNIX people: we fully realize that this isn't the grep or fgrep
  23.         with which you are familiar.  We know that the RE in GREP means
  24.         "regular expressions" and we know that we don't support regular
  25.         expressions.  However, the name serves to point people in the
  26.         right direction.  Please don't write to tell us that this "isn't
  27.         really grep".
  28.  
  29.  
  30.         DOS vs OS/2 versions
  31.         --------------------
  32.         Beginning with version 2.0, FGREP is supplied in both DOS and
  33.         OS/2 flavors.  Use and syntax is identical except for the -p and
  34.         -P options (see below).  In general, the two versions will be
  35.         supplied in separate archives; FGREP.EXE is the OS/2 version,
  36.         and FGREP.COM is the DOS version.
  37.  
  38.  
  39.         Incompatibility notes
  40.         ---------------------
  41.         In the OS/2 version, -p and -P are different options.  -p is
  42.         used to pause on full screen; -P is used to set the process
  43.         priority.  In the DOS version, -p is case insensitive and always
  44.         refers to the pause option.
  45.  
  46.         The absolute maximum line length in the OS/2 version is about
  47.         28K characters, versus about 60K characters for DOS.  See the
  48.         NOTES for more information.
  49.  
  50.  
  51.         Syntax
  52.         ------
  53.         FGREP's syntax is
  54.  
  55.       |         FGREP [-abBceflmMorpPsvwxz01] target {@file}
  56.  
  57.         Looks complicated, lots of switches, but the most common use is
  58.         very simple:
  59.  
  60.                 FGREP hello myfile.txt
  61.  
  62.         This command would display all lines of MYFILE.TXT that contain
  63.         the string "hello".
  64.  
  65.  
  66.         Targets
  67.         -------
  68.         The target is what you're looking for in the file.  There are
  69.         two ways to specify targets: as strings and as series of
  70.         hexadecimal bytes.  The two can be combined in a single target
  71.         specification.
  72.  
  73.         Strings are sequences of ASCII characters, like "hello".
  74.         Normally, you can just type in the string and forget it, but you
  75.         may have to "delimit" the string, i.e., bracket it by a pair of
  76.         matching non-alphanumeric characters (anything except '-' and
  77.         '$'):
  78.  
  79.             'string'
  80.             /string/
  81.             .string.
  82.  
  83.         Choose a delimiter that does not appear in the string.  This is
  84.         no good:
  85.  
  86.             'you've made a mistake'
  87.  
  88.         Delimiters are required for a string target if any of these four
  89.         conditions are met:
  90.  
  91.             -- it is combined with hex byte sequences (more below)
  92.             -- it contains spaces or tabs
  93.             -- it begins with a non-alphanumeric character
  94.             -- it contains the redirection characters < > |.
  95.  
  96.         In the last case, the string MUST be delimited by double quotes
  97.         ("), otherwise DOS will interpret it as redirection.
  98.  
  99.         Examples of valid string targets:
  100.  
  101.                 mov
  102.                 ax
  103.                 "two words"     (requires delimiter: contains a space)
  104.                 '/7'            (begins with non-alphanumeric)
  105.                 "f->x"          (contains ">", must use double quotes)
  106.  
  107.         It is always OK to delimit a string, even if delimiters are
  108.         unnecessary.
  109.  
  110.         REMEMBER that if the target contains DOS redirection characters
  111.         (<, >, or |), it MUST be delimited with double quotes ("") or
  112.         DOS will try to perform unwanted redirection.  For example:
  113.  
  114.             FGREP "a <= b" myfile.pas
  115.  
  116.         Hex byte sequences are used for binary file searching when the
  117.         bytes to be searched for are non-displayable characters or make
  118.         no sense as strings (e.g., program code).  They are specified as
  119.         pairs of hexadecimal bytes introduced by a leading '$':
  120.  
  121.             $EF
  122.             $CD21           (CDh, 21h)
  123.             $CD$21          (identical; either format is OK)
  124.             $00FFFE00       (00h, FFh, FEh, 00h)
  125.             $CD 21          (ILLEGAL: no spaces permitted)
  126.  
  127.         You can combine strings and hex sequences by using a '+':
  128.  
  129.             "abc"+$E74A+"def"
  130.  
  131.  
  132.         Target wildcards
  133.         ----------------
  134.         String targets (not hex targets) may contain one or mmore "?"
  135.         wildcards.  The ? will match any single non-null character in
  136.         the file.  E.g., "[?i]" will match "[si]", "[di]", etc., but not
  137.         "[i]".  Wildcards are not permitted when hex byte sequences are
  138.         used.
  139.  
  140.         If you want to search for the '?' character literally, use
  141.         '\?'.  For example, the target
  142.  
  143.                 what\?
  144.  
  145.         will search for the literal string "what?".
  146.  
  147.  
  148.         Specifying target files
  149.         -----------------------
  150.         You can list zero (see "Redirection"), one, or multiple files to
  151.         be searched.  Files listed may include DOS's * and ? wildcards.
  152.         Paths may be specified.  Examples:
  153.  
  154.             myfile.txt
  155.             *.txt
  156.             *.*
  157.             this.c that.c other.c
  158.             *.c *.pas
  159.             C:\UTIL\*.* D:\SYS\*.*
  160.             E:\LIBRARY\*.D?C
  161.  
  162.       | You may also specify a drive (with a terminating ':') or
  163.       | a directory (with a terminating '\'), indicating all files
  164.       | (*.*) in the specified drive or directory:
  165.       |
  166.       |     c:      [same as c:*.*]
  167.       |     \src\   [same as \src\*.*]
  168.  
  169.  
  170.         File lists
  171.         ----------
  172.         If the name of a file on the command line is prefixed with an
  173.         '@' character (e.g., '@list.txt'), the file is assumed to be a
  174.         text file containing the names of files to be searched.  For
  175.         example:
  176.  
  177.             fgrep hello @files.lst
  178.  
  179.         FGREP will assume that the file FILES.LST is a text file that
  180.         contains the names of files to be searched.  Each line of such a
  181.         file should contain the name(s) of one or more files to be
  182.         searched.  Files in file lists are specified exactly as are
  183.         files named on the command line, except that you can't use
  184.         another '@' file list; that is, file lists can't be nested.
  185.  
  186.         Here is an example of a valid list file:
  187.  
  188.             this.c
  189.             c:\c\*.c d:\c\*.c
  190.             d:\misc\*.txt
  191.  
  192.         The name specified for the list file cannot contain wildcards;
  193.         that is, this is illegal:
  194.  
  195.             fgrep hello @lists.*        (WRONG)
  196.  
  197.         If you want to search for text in a file whose name begins with
  198.         an '@', use a double '@'.  For example,
  199.  
  200.             fgrep hello @@foo.txt
  201.  
  202.         will search for 'hello' in the file @FOO.TXT.
  203.  
  204.  
  205.         Redirection
  206.         -----------
  207.         If no file is listed, FGREP will take its input from the
  208.         standard input device, allowing it to be used as a
  209.         filter. For example:
  210.  
  211.             DIR | fgrep pas
  212.  
  213.         would display any lines from a directory listing that contain
  214.         the string "pas".  Or,
  215.  
  216.             DIR | fgrep "<dir>"
  217.  
  218.         would list all subdirectories of the current directory.
  219.  
  220.         This command:
  221.  
  222.             arc p somefile foo.txt | FGREP somestring
  223.  
  224.         would display all lines from the file FOO.TXT in the archive
  225.         file SOMEFILE that contain "somestring".
  226.  
  227.         FGREP will terminate with an error if no file is listed and
  228.         standard input is not redirected.  Otherwise, it would be
  229.         waiting for keyboard input, possibly leading you to believe
  230.         that it had died.
  231.  
  232.  
  233.         Examples of use
  234.         ---------------
  235.         Here are some examples of FGREP use:
  236.  
  237.         1. List all lines of MYFILE.TXT containing "hello"
  238.  
  239.             FGREP hello myfile.txt
  240.  
  241.         2. List all lines of all *.C files in the current directory that
  242.         contain "include foo.c":
  243.  
  244.             FGREP "include foo.c"  *.c
  245.  
  246.         3. List all lines from FILEA.EXT, FILEB.EXT, and FILEC.EXT that
  247.         contain the string "abcd" followed by any character:
  248.  
  249.             FGREP abcd? filea.ext fileb.ext filec.ext
  250.  
  251.         4. Display occurrences of the byte CDh followed by 21h (a DOS
  252.         call) in the program MYPROG.EXE:
  253.  
  254.             FGREP $CD21 myprog.exe
  255.  
  256.         5. Display occurrences of the string "abc" followed by a byte of
  257.         zeroes in all files in the C:\UTIL and D:\SYS directories:
  258.  
  259.             FGREP 'abc' + $00 c:\util\*.* d:\sys\*.*
  260.  
  261.  
  262.         Output
  263.         ------
  264.         FGREP's default screen output looks like this:
  265.  
  266.                 **File <filename>
  267.                 [text of lines containing string]
  268.                 **File <filename>
  269.                 [text of lines containing string]
  270.  
  271.         If the "Microsoft" switch (-m or -M, see below) is used, the
  272.         output is in this format:
  273.  
  274.                 FILE.EXT(linenum): text
  275.  
  276.         This format is the standard format used by Microsoft (R)
  277.         language products and by its MEGREP.  If -m is used, only the
  278.         filename is displayed; if -M is used, the path will be included
  279.       | if one was specified on the command line (or if the path was
  280.       | generated by a recursive subdirectory search).
  281.  
  282.         When a hex byte sequence or the -b switch is specified, FGREP
  283.         uses the binary output mode.  See below for details.
  284.  
  285.         All useful output is sent to the standard output device, so it
  286.         may be piped to other programs or redirected to file:
  287.  
  288.                 FGREP target filea | yourprog
  289.                 FGREP target filea > test.txt
  290.  
  291.         Error messages and the program logo will appear always appear on
  292.         the console device, and will never appear in redirected or piped
  293.         output.
  294.  
  295.         FGREP returns an errorlevel to the operating system.  It will be
  296.         one of:
  297.  
  298.             0:   String not found in any file
  299.             1:   String found in at least one file
  300.             255: Error (file read error or bad parameter)
  301.  
  302.  
  303.         Switches
  304.         --------
  305.         These are the option switches that control how FGREP works.  All
  306.         switches are case-insensitive except -m/M, -b/B, and -p/P; for
  307.         example, either -a or -A will set ANSI mode.  All switches must
  308.         precede the target on the command line, but they may be in any
  309.         order.  If you specify conflicting switches, the last one will
  310.         be effective.
  311.  
  312.         -a is ANSI mode.  If you have ANSI.SYS (or equivalent)
  313.            installed, escape characters (ASCII 27) in displayed text
  314.            lines can cause odd results.  If you use the -A switch,
  315.            FGREP will substitute an upside-down question mark (¿) for
  316.            ESC, possibly resulting in cleaner displays.  You'll only
  317.            need this switch if you have ANSI installed and there are ESC
  318.            characters in the files you're scanning.  Ignored in binary
  319.            mode.
  320.  
  321.         -b specifies binary search mode/output.  This switch is
  322.            automatically set if you use a hex byte sequence in the
  323.            target.  See "binary search" below.
  324.  
  325.         -B specifies a case insensitive binary search.
  326.  
  327.         -c makes the search case sensitive ("String" will not match
  328.            "string" or "STRING").  Normally, FGREP ignores case.  This
  329.            switch is ignored in binary mode.
  330.  
  331.         -e specifies that ONLY an errorlevel is to be returned.
  332.            There will be no display at all.  This is equivalent to the
  333.            combination -s0.
  334.  
  335.         -f causes the "**File" header lines to be displayed only for
  336.            those files that contain the search string.
  337.  
  338.         -l adds line numbers to FGREP's output.  Ignored in binary mode.
  339.  
  340.         -m or -M specify Microsoft (R) output format.  See "Output"
  341.            above.  If -m is used, only the filename will appear.  If
  342.            -M is used, the path will be included if one was specified on
  343.            the command line.  Ignored in binary mode.
  344.  
  345.         -o specifies a maximum output width.  It should be followed by a
  346.            decimal number from 1 to 255.  For example, -o40 causes FGREP
  347.            to truncate all output to a maximum of 40 characters per
  348.            line.  Do not confuse the "O" (Output) switch with the "0"
  349.            (zero text) switch.  Ignored in binary mode.
  350.  
  351.         -p pauses on full screen of output.
  352.  
  353.       | -P sets the process priority (OS/2 only).  See below for
  354.       |    details.
  355.       |
  356.       | -r recursive (subdirectory) search.  For each filespec provided,
  357.       |    fgrep searches the specified directory and all subdirectories
  358.       |    for matching file names.  If no directory is specified, FGREP
  359.       |    begins the search with the current directory.  For example:
  360.       |
  361.       |         fgrep -r "text" *.c d:\src\*.c
  362.       |
  363.       |    This command searches all *.c files in the current directory
  364.       |    and all of its subdirectories; then it searches all *.c files
  365.       |    in D:\SRC and all of its subdirectories.
  366.  
  367.         -s suppresses the "**File" header lines in the output.
  368.  
  369.         -v provides a reVerse or negative search.  That is, all lines
  370.            that do NOT contain the specified string are displayed.  This
  371.            provides a handy way to get rid of lines containing specified
  372.            text.  Suppose, for example, that you have a file containing
  373.            a list of file names, and you are interested in all files
  374.            EXCEPT those that contain a '$' in the name (perhaps they are
  375.            temporary files):
  376.  
  377.                 FGREP -v "$" filename
  378.  
  379.            This switch is ignored in binary mode.
  380.  
  381.         -w indicates that white space (blanks and tabs) is not
  382.            significant.  White space in both the search string and the
  383.            input file will be ignored.  If -w is specified, the wildcard
  384.            character (?) will match any nonblank character.  Ignored in
  385.            binary mode.
  386.  
  387.         -x do not display the logo/copyright.
  388.  
  389.       | -z displays only the actual text found (rather than the entire
  390.       |    line containing the text).  This is useful with wildcards;
  391.       |    for example, the command
  392.       |
  393.       |         fgrep -z "??rse" dict.txt
  394.       |
  395.       |    might display "parse", "purse", "horse", etc. (perhaps
  396.       |    from a dictionary).  Note that the displayed text will be
  397.       |    all uppercase if the search is case insensitive; and, any
  398.       |    embedded spaces will be missing if the search is white
  399.       |    space insensitive (-w option).  -z and -v (reVerse search)
  400.       |    are incompatible.
  401.  
  402.         -0 ("0" text lines) suppresses the display of lines of text
  403.            containing the specified string.  FGREP will skip immediately
  404.            to the next file when the string is found.  Do not confuse
  405.            this with the "O" (Output width) switch.
  406.  
  407.         -1 ("1" text line) specifies that only the first line containing
  408.            containing the specified string in each file will be
  409.            displayed.  FGREP will then skip immediately to the next
  410.            file.
  411.  
  412.  
  413.         Binary search
  414.         -------------
  415.         If you use a hex byte sequence in your target, or if you specify
  416.         the -b or -B switch, FGREP uses a "binary" mode rather than the
  417.         usual text mode.  In this mode, FGREP is not concerned with
  418.         "lines" of text and can be used to search any file for arbitrary
  419.         sequences of bytes.
  420.  
  421.         The output format is different.  Because there are no "lines" to
  422.         display, FGREP shows the locations in the file where the target
  423.         was found and the sixteen bytes surrounding the find (eight
  424.         before, and eight after).  Here is the output format, split into
  425.         two lines:
  426.  
  427.             nnnnnnnn: n n n n n n n n . n n n n n n n n
  428.                       cccccccc . cccccccc
  429.  
  430.         The initial sequence is the 32-bit file offset where the target
  431.         was found, in hex.  For example,
  432.  
  433.             0001C47A:
  434.  
  435.         indicates that the target was found at file offset 1C47A.
  436.  
  437.         The next two series (n n n ...) represent the eight bytes before
  438.         and after the target (which, logically, occurred at the '.'
  439.         position):
  440.  
  441.             4B 7F 37 42 42 44 FF FF . 20 20 21 48 48 4F 3C 22
  442.  
  443.         The final series (ccc...) represents the same sixteen bytes
  444.         displayed as characters.  Nondisplayable characters are shown as
  445.         periods.
  446.  
  447.         Unlike text searches, binary searches are normally case
  448.         sensitive.  That is, $41 ('A') will not match $61 ('a').  If you
  449.         want a binary search to be case INsensitive ($41 matches both
  450.         $41 and $61), use -B instead of -b.  The normal case sensitive
  451.         switch (-c) is ignored.
  452.  
  453.         These switches are also ignored in binary mode:
  454.  
  455.             -l          (show line numbers)
  456.             -w          (whitespace insensitive)
  457.             -v          (inverse search)
  458.             -m/M        (Microsoft format)
  459.  
  460.         Also, wildcards are not permitted in string targets when a
  461.         binary search is used.
  462.  
  463.  
  464.         OS/2 priority setting
  465.         ---------------------
  466.         Under OS/2, FGREP, like all programs, starts out with a
  467.         "standard" priority (regular, lowest level).  The -P option
  468.         allows you to alter the priority so that FGREP gets a greater
  469.         or lesser share of available timeslices.  The format is:
  470.  
  471.             -P[c | r | s] * | #
  472.  
  473.         The first letter sets the priority class, as follows:
  474.  
  475.             c = time critical (highest)
  476.             r = regular (default)
  477.             i = idle (lowest)
  478.  
  479.         If no class letter is present, 'r' is assumed.  The priority
  480.         class letter is case sensitive.
  481.  
  482.         After the priority class letter is a priority value from 1
  483.         (lowest) to 32 (highest), or '*', which means "highest" (32).
  484.  
  485.         Examples:
  486.  
  487.             -Pc32       critical, priority 32 (highest possible)
  488.             -Pc*        same as -Pc32
  489.             -Pr16       regular, priority 16 (middle of the road)
  490.             -P16        same as -Pr16
  491.             -Pi1        idle, priority 1 (lowest possible)
  492.  
  493.         Depending on various system factors, you may or may not see
  494.         much difference in speed from altering the priority level.
  495.  
  496.  
  497.         "Fast" search algorithm
  498.         -----------------------
  499.         FGREP uses two different search techniques.  Both are fast, but
  500.         one is faster than the other.  The faster search will be used
  501.         UNLESS any of these conditions are met:
  502.  
  503.             - line numbers or Microsoft (R) format used (-L or -m/M)
  504.             - the search is reVerse (-V)
  505.             - the search is whitespace insensitive (-W)
  506.             - the target string contains wildcards ("?")
  507.  
  508.         For other searches, the "fast" technique is typically 20-40%
  509.         faster than the "slow", although we've seen 70% improvements in
  510.         some cases.  One tester reported that FGREP located a string in
  511.         the last line of a 440K file in 0.97 seconds (IBM AT).
  512.  
  513.         The technique has its roots in searching for unusual (less
  514.         frequently used) characters, so it will make more of a
  515.         difference searching for "squeeze" (q is a little-used letter)
  516.         than it will searching for "eat".
  517.  
  518.  
  519.         Notes
  520.         -----
  521.         1. The -f and -s switches are mutually exclusive.  If both are
  522.         specified, the last one will be effective.
  523.  
  524.         2. The -M/m and -s switches are mutually exclusive.  If both
  525.         are specified, the last one will be effective.
  526.  
  527.       | 3. The -v and -z switches are mutually exclusive.  If both are
  528.       | specified, FGREP terminates with an error.
  529.  
  530.         4. If you specify the -e switch, FGREP will stop processing as
  531.         soon as a nonzero errorlevel is determined.  The -e switch is
  532.         really designed to enable other programs to determine whether or
  533.         not a specific file contains a specific string in as little time
  534.         as possible.  For example, here's an algorithm that will quickly
  535.         'touch' all files that do NOT contain a specified string:
  536.  
  537.                 for file in (*.*) do
  538.                     FGREP -e string file
  539.                     if errorlevel < 1 then touch file
  540.                 end
  541.  
  542.         5. The -s switch is automatically set when input is taken from
  543.         standard input.
  544.  
  545.         6. FGREP optimizes the combination -s0 (suppress headers, no
  546.         text) to -e.
  547.  
  548.         7. If you just want to know which files contain a string, use -0;
  549.         it saves time because the rest of the file (after the first hit)
  550.         is skipped.  The combination -0f is particularly efficient
  551.         for this as it will simply display a list of files that contain
  552.         the string.
  553.  
  554.         8. In either version, there is a maximum line length of 500
  555.         characters if any of the -V, -W, -L, or -M switches are used;
  556.         otherwise, the maximum line length is about 60K for DOS.  For
  557.         OS/2 there is an absolute maximum line line of about 28K, but
  558.         there are some conditions where line lengths grater than 750
  559.         bytes will cause problems.  In general, avoid using lines longer
  560.         than 750 bytes.
  561.  
  562.         9. FGREP expects standard text files; binary files will yield
  563.         weird results unless you use the -b/B binary switch.  Word
  564.         processor files may or may not work, depending on how they are
  565.         formatted.  Lines can be terminated by any of CR, LF, or CR+LF.
  566.  
  567.         10. If output is redirected to disk, make sure there is enough
  568.         space available.  The program does not check.
  569.  
  570.  
  571.         A little note from the author
  572.         -----------------------------
  573.         I get lots of calls like this:
  574.  
  575.             I love FGREP because it's so fast.  It outperforms the next
  576.             faster text search utility I have by two-to-one.  If you
  577.             could just add (regular expressions | boolean searches), it
  578.             would be ideal.
  579.  
  580.         Well, one of the reasons why FGREP is so fast is because it
  581.         doesn't have to do lots of complex searching.  Because the
  582.         search is simple, I've been able to highly optimize the search
  583.         algorithms.  If I added regular expressions or boolean searches,
  584.         the main thing that distinguishes FGREP (its speed) from
  585.         other text search programs would go away.
  586.  
  587.         So.  I'm always glad to get comments and suggestions on FGREP,
  588.         so please keep calling and writing.  But I won't be adding
  589.         regular expressions or boolean searches.  If you need those,
  590.         there are plenty of fancier search programs available (including
  591.         the real grep).  The penalty for greater flexibility is usually
  592.         less speed.
  593.  
  594.  
  595.         Version 2.00
  596.         ------------
  597.         Added multithreaded OS/2 version.
  598.         Added recursive search.
  599.         Added ability to specify just drive/directory (assumes *.*).
  600.         Added -z switch.
  601.         Includes path in **File lines if supplied or when path is
  602.           generated by a recursive search.
  603.  
  604.         Version 1.71
  605.         ------------
  606.         Adds file lists.
  607.         Adds file sharing support.
  608.         Corrects two bugs in binary mode display: displaying data beyond
  609.             end of file, and skipping bytes immediately after the
  610.             target.
  611.  
  612.         Version 1.70
  613.         ------------
  614.         Adds binary search.
  615.         Adds target concatenation (target+target).
  616.         Cancels if no file specified and not redirected.
  617.  
  618.         Version 1.64
  619.         ------------
  620.         Bug fix release only: fix garbage in -M display from 1.63
  621.  
  622.         Version 1.63
  623.         ------------
  624.         Distinguish between -M (path) and -m (no path) switches.
  625.         -M/-m and -S now mutually exclusive.
  626.         Allow search for literal '?' character via '\?'.
  627.  
  628.         Version 1.62
  629.         ------------
  630.         Added -M switch.
  631.         Increased max length of lines ("slow" search) from 256 to 500.
  632.  
  633.         Version 1.61
  634.         ------------
  635.         Fixed a problem with pausing on > 255 hits (-P not specified).
  636.  
  637.         Version 1.60
  638.         ------------
  639.         Added -P switch.
  640.         Fixed a problem with tab characters and -O switch.
  641.  
  642.         Version 1.59
  643.         ------------
  644.         Added -O switch.
  645.         Altered -L operations to allow for line numbers > 65535.  Line
  646.         numbers now right justified in a 6-character field.
  647.  
  648.         Version 1.58
  649.         ------------
  650.         Fixed two problems that were causing endless loops in 1.55-1.57.
  651.         Added -A switch.
  652.  
  653.         Version 1.57
  654.         ------------
  655.         Added -X switch.
  656.  
  657.         Versions 1.55/1.56
  658.         -----------------
  659.         "Fast" search algorithm added (thanks to Dave Angel for the
  660.             idea and the shove).
  661.         Fixed problems with redirected input.
  662.         Forced -v (reVerse) search to show blank lines.
  663.  
  664.         Versions 1.50/1.51
  665.         ------------------
  666.         These versions contain no new features but are significantly
  667.         faster than earlier versions.  Standard (case-insensitive)
  668.         searches run about 40% faster than 1.45 (which was 25-30%
  669.         faster than 1.40).  "Literal" searches (case-sensitive and
  670.         spacing-sensitive) are highly optimized and may be as much as
  671.         70% faster than 1.45.
  672.  
  673.         Version 1.45
  674.         ------------
  675.         We found a few areas that could be made more efficient.  This
  676.         version can be as much as 25-30% faster than version 1.40.
  677.  
  678.         The -L (line numbers) option was added, and improvements made to
  679.         parameter parsing such that delimiters are not always necessary.
  680.  
  681.  
  682.         Copyright/License/Warranty
  683.         --------------------------
  684.         This document and the program files FGREP.EXE and FGREP.COM
  685.         ("the software") are copyrighted by the author.  If you are an
  686.         individual, the copyright owner hereby licenses you to:  use the
  687.         software; make as many copies of the program and documentation
  688.         as you wish; give such copies to anyone; and distribute the
  689.         software and documentation via electronic means.  There is no
  690.         charge for any of the above.
  691.  
  692.         However, you are specifically prohibited from charging, or
  693.         requesting donations, for any such copies, however made; and
  694.         from distributing the software and/or documentation with
  695.         commercial products without prior permission.  An exception is
  696.         granted to not-for-profit user's groups, which are authorized to
  697.         charge a small fee (not to exceed $7) for materials, handling,
  698.         postage, and general overhead.  NO FOR-PROFIT ORGANIZATION IS
  699.         AUTHORIZED TO CHARGE ANY AMOUNT FOR DISTRIBUTION OF COPIES OF
  700.         THE SOFTWARE OR DOCUMENTATION, OR TO INCLUDE COPIES OF THE
  701.         SOFTWARE OR DOCUMENTATION WITH SALES OF THEIR OWN PRODUCTS.
  702.  
  703.         THIS INCLUDES A SPECIFIC PROHIBITION AGAINST FOR-PROFIT
  704.         ORGANIZATIONS DISTRIBUTING THE SOFTWARE, EITHER ALONE OR WITH
  705.         OTHER SOFTWARE, AND CHARGING A "HANDLING" OR "MATERIALS" FEE OR
  706.         ANY OTHER SUCH FEE FOR THE DISTRIBUTION.  NO FOR-PROFIT
  707.         ORGANIZATION IS AUTHORIZED TO INCLUDE THE SOFTWARE ON ANY MEDIA
  708.         FOR WHICH MONEY IS CHARGED.  PERIOD.
  709.  
  710.         Businesses, institutions, and governmental entities must obtain
  711.         a specific license agreement from The Cove Software Group in
  712.         order to use the software.
  713.  
  714.         No copy of the software may be distributed or given away without
  715.         this document; and this notice must not be removed.
  716.  
  717.         There is no warranty of any kind, and the copyright owner is not
  718.         liable for damages of any kind.  By using this free software,
  719.         you agree to this.
  720.  
  721.         The software and documentation are:
  722.  
  723.                            Copyright (C) 1985-1991 by
  724.                              Christopher J. Dunford
  725.                             The Cove Software Group
  726.                                  P.O. Box 1072
  727.                             Columbia, Maryland 21044
  728.  
  729.                                  (301) 992-9371
  730.                          CompuServe 76703,2002 [IBMNET]
  731.