Annotation of 43BSDTahoe/usr.lib/learn/editor/L70.1a, revision 1.1.1.1

1.1       root        1: #print
                      2: Perhaps the most powerful command in the editor is the 'g' 
                      3: (global) command.   This always precedes a second command
                      4: on the same command line; it selects those file lines
                      5: on which the second command is to be executed.
                      6: For example
                      7:   g/abc/s/def/ghi/p
                      8: says: "Find all lines in the file which
                      9: contain the string "abc"; change the first
                     10: "def" on any such line into "ghi".  The command
                     11: after the 'g' may be any command, of course.
                     12: Needless to say, the expressions after the 'g' may
                     13: include all the special characters.
                     14: Edit the file "towns" so that each line beginning
                     15: with "-" has " (county seat)" added at its end.
                     16: Rewrite the file and type "ready".
                     17: #create Ref
                     18: -newark (county seat)
                     19:   east orange
                     20:   south orange
                     21:   maplewood
                     22: -elizabeth (county seat)
                     23:   linden
                     24:   cranford
                     25:   westfield
                     26: -morristown (county seat)
                     27:   madison
                     28:   chatham
                     29:   dover
                     30: #create towns
                     31: -newark
                     32:   east orange
                     33:   south orange
                     34:   maplewood
                     35: -elizabeth
                     36:   linden
                     37:   cranford
                     38:   westfield
                     39: -morristown
                     40:   madison
                     41:   chatham
                     42:   dover
                     43: #user
                     44: #cmp towns Ref
                     45: #log
                     46: #next
                     47: 71.1a 10
                     48: 70.2e 9
                     49: 70.2d 6

unix.superglobalmegacorp.com

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