summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/editor/L18.1a
blob: 488a804ec15b344c3a4ce1ce6b1e8829f66c3bb6 (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
#print
Sometimes it is desirable to add text before a
known line, rather than after it.  For this purpose
there is an 'i' (insert) command that places the new
material before the specified line. Otherwise, 'i'
is exactly like 'a', so that
  3i
is the same as
  2a
Remember the address of the last line?  Just
before the last line of file 'airlines'
insert the line

twa

and then rewrite the file with w, q, and type ready.
#create Ref
american
braniff
continental
delta
eastern
national
pan am
twa
united
#create airlines
american
braniff
continental
delta
eastern
national
pan am
united
#user
#cmp airlines Ref
#log
#next
19.1a 10