Annotation of 42BSD/usr.lib/learn/editor/L35.1a, revision 1.1

1.1     ! root        1: #print
        !             2: The "*" character is also used in substitute commands,
        !             3: but it has a different meaning.  Here it means
        !             4: "any number of repetitions of the previous character".
        !             5: (including zero!).  Thus
        !             6:   a*
        !             7: is any number of 'a' characters, and
        !             8:   [ab]*
        !             9: is any number of either 'a' or 'b' characters.  So
        !            10:   s/ab*/xy/
        !            11: looks for an 'a' followed by any number of 'b'
        !            12: letters, and will change
        !            13:    abbb cde
        !            14: into
        !            15:    xy cde
        !            16: You can use '*' after anything, including for example
        !            17: blank.  Thus 
        !            18:   s/a */a/
        !            19: removes all the blanks after the letter 'a'.  In this
        !            20: directory there is a file 'text'.  On the third line,
        !            21: remove the blanks after the word 'the'.  Then rewrite the
        !            22: file and type "ready".
        !            23: #create Ref
        !            24: This is the file
        !            25: for experimentation
        !            26: with the(substitute)
        !            27: command.
        !            28: #create text
        !            29: This is the file
        !            30: for experimentation
        !            31: with the                  (substitute)
        !            32: command.
        !            33: #user
        !            34: #cmp text Ref
        !            35: #log
        !            36: #next
        !            37: 36.1a 10
        !            38: 36.2a 5

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.