Commit | Line | Data |
---|---|---|
3eb5d546 C |
1 | |
2 | You can use a range of line numbers with the | |
3 | substitute command to change more than one line at once. | |
4 | For example, | |
5 | 1,5s/dog/&s/ | |
6 | will change "dog" on each of the first five lines of the | |
7 | file into "dogs". Edit file "text" and change the word | |
8 | "cat" on every line into "mouse". | |
9 | Then rewrite the file and type "ready". | |
10 | #create Ref | |
11 | domestic mouse | |
12 | alley mouse | |
13 | persian mouse | |
14 | angora mouse | |
15 | wildmouse | |
16 | #create text | |
17 | domestic cat | |
18 | alley cat | |
19 | persian cat | |
20 | angora cat | |
21 | wildcat | |
22 | #user | |
23 | #cmp text Ref | |
24 | #log | |
25 | #next | |
26 | 38.1a 10 | |
27 | 38.2a 6 |