|
|
1.1 ! root 1: #print ! 2: There is one last class of substitutions that ! 3: you should know about: converting one line ! 4: into two or more by substituting a newline ! 5: into the middle. Suppose you want to split the line ! 6: Now is the time for all good men ! 7: into ! 8: Now is the time ! 9: for all good men ! 10: without re-typing. The substitute command is ! 11: s/time /time\ ! 12: / ! 13: The backslash indicates that a newline is to be ! 14: inserted at that point; the rest of the "s" ! 15: command is actually typed on a new line. ! 16: ! 17: Practice by splitting the first line in file "btl" into ! 18: ! 19: Bell Laboratories ! 20: Murray Hill, NJ 07974 ! 21: ! 22: using the "s" command as illustrated above. Be sure to delete ! 23: the comma and space properly. Re-write the file, then type "ready". ! 24: #create Ref ! 25: Bell Laboratories ! 26: Murray Hill, NJ 07974 ! 27: #create btl ! 28: Bell Laboratories, Murray Hill, NJ 07974 ! 29: #user ! 30: #cmp btl Ref ! 31: #log ! 32: #next ! 33: 45.1b
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.