Commit | Line | Data |
---|---|---|
fed84c9b TL |
1 | |
2 | You can now change a line of a file, using only the | |
3 | commands already taught, by deleting the old line | |
4 | and inserting a new one. | |
5 | This is not a very convenient way to do that, so | |
6 | there is a command 'c' (change) which combines | |
7 | those operations. | |
8 | 5c | |
9 | input text | |
10 | here. | |
11 | . | |
12 | will delete line 5 and replace it by the lines | |
13 | ||
14 | input text | |
15 | here. | |
16 | ||
17 | Note that the text following 'c', just like the text | |
18 | after 'i' and 'a', must end with a line containing just | |
19 | one '.' and nothing else. | |
20 | This directory contains a file named 'short' | |
21 | with six lines in it. Change the last line to read | |
22 | ||
23 | new version of last line | |
24 | ||
25 | and rewrite the file; then end with "ready". | |
26 | #create Ref | |
27 | This is a short file | |
28 | which contains exactly | |
29 | six lines of text | |
30 | of which you are | |
31 | to change the last line | |
32 | new version of last line | |
33 | #create short | |
34 | This is a short file | |
35 | which contains exactly | |
36 | six lines of text | |
37 | of which you are | |
38 | to change the last line | |
39 | this is the last line. | |
40 | #pipe | |
41 | #user | |
42 | #unpipe | |
43 | #cmp Ref short | |
44 | #log | |
45 | #next | |
46 | 21.1a 10 |