Bell 32V development
[unix-history] / usr / lib / learn / editor / L11.2a
CommitLineData
fed84c9b
TL
1#print
2So far I have always put you into the editor.
3How do you get there yourself? The main command
4interpreter (the shell) recognizes
5 ed
6as the name of the editor. (On some systems,
7it is also called "e", which is a useful abbreviation.)
8You can also say
9 ed file1
10which put you in the editor with the current file
11"file1". So, for example, you can print the
12last line of a file with
13 ed NAME
14 $p
15 w
16 q
17where NAME is the name of the file.
18
19In this directory is a file named "file45". Print the
20last line of it, and then exit as above.
21#create Ref
22This file contains nothing
23of great importance and
24you should not be printing
25these lines because the only
26line that you were asked for
27was
28this line, the last line.
29#create file45
30This file contains nothing
31of great importance and
32you should not be printing
33these lines because the only
34line that you were asked for
35was
36this line, the last line.
37#copyout
38#pipe
39#user
40#unpipe
41#uncopyout
42grep last .ocopy >X1
43tail -1 Ref >X2
44#cmp X1 X2
45#log
46#next
4711.2b 10
4812.2a 5