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