blob: 1a5665031d1bb992b9c0207eedae7746b1b8647e (
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
25
26
27
28
29
30
31
32
33
34
|
#print
As with other commands, you can specify a line number
with the 's' command. Thus
3s/x/a/
will change the first 'x' on line 3 to an 'a'. Here is
a file "street" in which the fifth line has an 'r'
where it should have an 'a'. Try
the sequence
ed street
5s/r/a/
5p
w
q
ready
#create Ref
first avenue
second avenue
third avenue
lexington avenue
park avenue
madison avenue
#create street
first avenue
second avenue
third avenue
lexington avenue
prrk avenue
madison avenue
#user
#cmp street Ref
#log
#next
30.2d 5
|