**********************************************************************
*                             SUB                                    *
**********************************************************************
*                  COPYRIGHT 1983 EUGENE H. MALLORY                  *
**********************************************************************
PROGRAM:
    SUB    Finds and substitutes text strings in I/O stream.
USAGE:
    SUB    [<fid] pattern [replace] [-H] [>fid]
FUNCTION:
    This searches the input for the supplied pattern and replaces it 
    with the replacement string. All occurances of the pattern will
    be replaced.
    The -H options will display the meta characters.
    The pattern is very general.  
    
    There are the following meta characters.
    *	Any number of any characters, from 0 to 132.
    ?	Any single character.
    _	A space character.
    \	Literal character.  Used to include *, ? etc. in pattern.
    {	Beginning of line.
    }	End of line.
    @	Any alpha character.
    #	Any number.
    !	NOT  This may be used with any printable character, _,
    	{, }, @, and #,  as well as \char forms.  This can be used 
	to find	strings NOT at the beginnnin# or end of a line.
    
    The replacement string is optional.  If missing, the matched 
    pattern(s) is deleted from the line.
    
    Because CP/M translates characters into upper case and 
    deletes spaces, and because the I/O redirection and pipes use <, 
    >, and + as markers, some special conventions are provided to get 
    around these restrictions.  These are:
    
    \	Literal follows.  Used with restricted characters like \+ .
    _	Space.  May be used as a space.  Use \_ if you want a literal _.
    ~   Lowercase flag.  Letter which follows goes into lower case.
    *   Insert match string here.  May be used more than once.
EXAMPLE:
    LS *.DOC |SUB * CLEAN_<*_>* >CLEAN.SUB {Creates submit file to}
		       			   {CLEAN all .DOC files. }
COMMENTS:
    All pattern matching is done in uppercase mode.  "abc" will
    always match "ABC".

        Command Line                       
___________________________________  
                                  |  
                                  |  PATTERN AND REPLACEMENT STRING
                    ______________V______________    
 Standard Input     |                           |   Standard Output
     TEXT           |                           |    SUBSTITUTED TEXT
------------------->|            SUB            |----------------------->
                    |                           |
                    |                           |
                    |___________________________|
