Commit | Line | Data |
---|---|---|
fd15fd37 BJ |
1 | |
2 | Each 'w' command typed so far has written the edited material | |
3 | back on the same file that it came from originally. | |
4 | This can be changed by giving a filename on the 'w' command: | |
5 | w camden | |
6 | will write the current editor buffer | |
7 | on file 'camden'. What does the following | |
8 | sequence of commands do? | |
9 | ed old | |
10 | w new | |
11 | q | |
12 | As you can see, it picks up file 'old', and | |
13 | writes it on file 'new'. It has the same effect | |
14 | as | |
15 | cp old new | |
16 | does. | |
17 | ||
18 | This directory contains a file | |
19 | with a name beginning with 'h'. Make a copy | |
20 | of that file named 'norman'. Check the copy | |
21 | by listing the old and new files with 'cat' before | |
22 | you type 'ready'. | |
23 | #create harry | |
24 | Four score and seven years ago our | |
25 | fathers brought forth on this continent | |
26 | a new nation, conceived in liberty and | |
27 | dedicated to the proposition that | |
28 | all men are created equal. | |
29 | #user | |
30 | #cmp harry norman | |
31 | #log | |
32 | #next | |
33 | 12.1b 10 |