|
|
1.1 root 1: #print
2: Normally the 's' command only changes
3: the first instance on a line of the expression
4: it is looking for. Sometimes you want to change
5: more than one instance. If you put a 'g' after the
6: command, as in
7: s/cat/dog/g
8: all instances of 'cat' will be changed to 'dog'. To
9: print the result you must say
10: s/cat/dog/gp
11: ('pg' at the end doesn't work, sorry).
12: Edit file 'stuff' in this directory to change every
13: instance of 'green' to 'red' on every line.
14: Then rewrite the file and type "ready".
15: #create Ref
16: red light, village red
17: red book, red paper, red pencil
18: red car, red sign, redhorn
19: #create stuff
20: green light, village green
21: green book, green paper, green pencil
22: green car, green sign, greenhorn
23: #user
24: #cmp stuff Ref
25: #log
26: #next
27: 43.1a 10
28: 43.2a 5
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.