Annotation of 43BSD/usr.lib/learn/editor/L35.2d, revision 1.1

1.1     ! root        1: #print
        !             2: A useful operation is to replace a string of several blanks
        !             3: by exactly one blank.  Note that you can't just write
        !             4: 
        !             5: s/ */ /
        !             6: 
        !             7: because the " *" will match any number of blanks
        !             8: including zero.  Thus it will always match at the beginning
        !             9: of the line, even if there is no blank there.
        !            10: The normal sequence is
        !            11: 
        !            12: s/  */ /
        !            13: which will only substitute for a string
        !            14: that has at least one blank in it.
        !            15: Try that command on the line in the file "line".
        !            16: Then rewrite the file "line" and type "ready".
        !            17: #create Ref
        !            18: here is a long space.
        !            19: #create line
        !            20: here      is a long space.
        !            21: #user
        !            22: #cmp line Ref
        !            23: #log
        !            24: #next
        !            25: 35.2e 5

unix.superglobalmegacorp.com

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