Commit | Line | Data |
---|---|---|
fd15fd37 BJ |
1 | |
2 | Normally the 's' command only changes the first instance | |
3 | on a line of the expression it is recognizing. Sometimes you want | |
4 | to change everything. For example, try the following sequence, | |
5 | and note the difference between the changes on the two lines. | |
6 | ||
7 | ed test | |
8 | 1,2p | |
9 | 1s/cat/cats/p | |
10 | 2s/cat/cats/gp | |
11 | w | |
12 | q | |
13 | ready | |
14 | #create Ref | |
15 | the cats in the catalog is a persian cat | |
16 | the cats in the catsalog is a persian cats | |
17 | #create test | |
18 | the cat in the catalog is a persian cat | |
19 | the cat in the catalog is a persian cat | |
20 | #user | |
21 | #cmp test Ref | |
22 | #log | |
23 | #next | |
24 | 42.2b 5 |