Commit | Line | Data |
---|---|---|
fd15fd37 BJ |
1 | |
2 | So far you have learned how to | |
3 | copy and print existing files, and now | |
4 | you probably want to know how to add new text | |
5 | to a file. The "a" (append) command lets | |
6 | you do that. For example, the sequence | |
7 | ed file | |
8 | a | |
9 | A man, a plan, a canal - Panama. | |
10 | . | |
11 | w | |
12 | q | |
13 | will append the line | |
14 | A man, a plan, a canal - Panama. | |
15 | to the editor buffer, and write it on file "file". | |
16 | (If "file" didn't exist already, the editor will | |
17 | warn you. It's not an error, just a warning.) | |
18 | Try that. Then say "cat file" to check what was written, | |
19 | and then type "ready". | |
20 | #create Ref | |
21 | A man, a plan, a canal - Panama. | |
22 | #user | |
23 | #cmp file Ref | |
24 | #log | |
25 | #next | |
26 | 15.2b 5 | |
27 | 15.3b 2 |