Commit | Line | Data |
---|---|---|
3eb5d546 C |
1 | |
2 | So far you only know how to copy and print existing files | |
3 | in the editor, and not how to get started from scratch. | |
4 | The 'a' (append) command lets you type in new text. | |
5 | For example, the sequence | |
6 | ed file | |
7 | a | |
8 | this is a new line of text | |
9 | . | |
10 | w | |
11 | q | |
12 | will append the line | |
13 | this is a new line of text | |
14 | to the editor buffer, and then write it on "file". | |
15 | (If "file" doesn't already exist, the editor will | |
16 | warn you, but it's not an error.) | |
17 | Note that the material being added ends with the | |
18 | line that just contains a single '.' and that normal | |
19 | editor commands then resume. Following this pattern, | |
20 | make a file named "pres" that contains the | |
21 | line | |
22 | ||
23 | franklin delano roosevelt | |
24 | ||
25 | and, after you have written it with a 'w' command, | |
26 | and done your 'q', try saying "cat pres" to check that | |
27 | you did it right. | |
28 | Then type "ready". | |
29 | #create Ref | |
30 | franklin delano roosevelt | |
31 | #user | |
32 | #cmp pres Ref | |
33 | #log | |
34 | #next | |
35 | 15.1b 10 |