summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/editor/L20.1a
blob: d2aa4f43e048d4b916bf8ffe5c8c33cf08b17677 (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
42
43
44
45
46
#print
You can now change a line of a file, using only the
commands already taught, by deleting the old line
and inserting a new one.
This is not a very convenient way to do that, so
there is a command 'c' (change) which combines
those operations.
  5c
  input text
  here.
  .
will delete line 5 and replace it by the lines

input text
here.

Note that the text following 'c', just like the text
after 'i' and 'a', must end with a line containing just
one '.' and nothing else.
This directory contains a file named 'short'
with six lines in it.  Change the last line to read

new version of last line

and rewrite the file; then end with "ready".
#create Ref
This is a short file
which contains exactly
six lines of text
of which you are
to change the last line
new version of last line
#create short
This is a short file
which contains exactly
six lines of text
of which you are
to change the last line
this is the last line.
#pipe
#user
#unpipe
#cmp Ref short
#log
#next
21.1a 10