summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/editor/L10.1a
blob: 8c892ca42f95ac850410009be75428a688621d3e (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
#print
Often, what you want to do is print an entire file,
and often you don't know exactly how long it is.
There is a special abbreviation for this purpose:
the character
  $
refers to the last line in the file, and so
1,$p prints all of a file.
Here's a new file.  Print it out using the editor
command 1,$p.  Then do the usual w, q, and 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