blob: f60beca6a00bebc5aa37248cc8f60af3ed522074 (
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
|
#print
Often you want to refer to the last line
of a file, and you don't know how long it is.
There is a special address, "$" for this purpose.
"$" refers to the end of a file. Thus
$p
prints the last line of a file and
1,$p
prints all of a file.
Here's another file. Print all of it, and
then type the usual w, q, and ready.
Your commands should look like
1,$p
w
q
ready
#create Ref
1,$p
w
q
#create file
New York Mets Managers
Casey Stengel
Wes Westrum
Gil Hodges
Yogi Berra
Roy McMillan
#copyin
#pipe
ed file
#user
#unpipe
#uncopyin
tail -3 .copy >X1
#cmp X1 Ref
#log
#next
10.1b 10
10.2b 5
|