BSD 3 development
[unix-history] / usr / lib / learn / editor / L60.1a
CommitLineData
fd15fd37
BJ
1#print
2So far you have always dealt with one file at a time.
3Suppose you wanted to combine two files - there is nothing
4we have covered so far that will do that. But the
5editor does have a command 'r' (read)
6
7r file
8
9which reads in the contents of "file" without throwing
10away what you already have. So that you can combine
11the files "cat" and "dog" (and name the result "animal")
12by saying
13
14ed
15r cat
16r dog
17w animal
18q
19
20In this directory are four files named
21for continents. Combine them into
22one file named "world".
23(Read the files in alphabetical order,
24as they are listed). You may want to list
25the input files and the combined files
26with "cat" to see what they look like.
27When done, type "ready" as usual.
28#create Ref
29This is file
30'africa' and will be listed first.
31------
32this file will
33have to do
34for both american
35continents
36-----
37 File "asia"
38 is indented
39 two spaces.
40Europe's file is only one line long.
41#create africa
42This is file
43'africa' and will be listed first.
44#create america
45------
46this file will
47have to do
48for both american
49continents
50-----
51#create asia
52 File "asia"
53 is indented
54 two spaces.
55#create europe
56Europe's file is only one line long.
57#user
58#cmp Ref world
59#log
60#next
6160.1b 10