summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/editor/L16.2a
blob: f5121add08d862de21cb7c4d4c991d9cb0548a64 (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
35
36
37
38
39
40
41
#print
So far you have always appended to an empty file,
so that there was no problem about where the appended lines
were placed in the file.  If the file you're appending to
already has lines in it, you can say where you want the
new material to be placed by giving a line address with 'a',
and you can check on this by printing the file.
Try the following sequence and note what happens to the new lines
that are added with the "3a" command:

ed rivers
1,$p
3a
merrimack
connecticut
hudson
.
1,$p
w
q
ready
#create Ref
penobscot
androscoggin
kennebec
merrimack
connecticut
hudson
delaware
susquehanna
#create rivers
penobscot
androscoggin
kennebec
delaware
susquehanna
#user
#cmp rivers Ref
#log
#next
16.2c 5