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