summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/editor/L3.1b
blob: 3b1e9b80097699f63c8322ca329a6e05746821b0 (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
#print
A particularly important editor command
is 'w' (write).  This writes whatever
you are working on, including everything you
have typed in or changed, into a file,
so that you can work on it again later.
If you try to quit from the editor without
writing out your changes, the editor will complain
(but only once -- a second 'q' will let you out).
Generally it's wisest to leave the editor by typing

w
q

rather than just 'q'.  I'll put you in the editor;
type those two commands to leave.  Then type
"ready".
#create bpres
Washington Adams Jefferson
#create pres
Washington Adams Jefferson
#pipe
ed pres
#user
#unpipe
#cmp pres bpres
#succeed
Note that the editor typed 27.  This is the number
of characters it wrote into the file.  This
is reassuring - it tells you the write was
successful.  The count of characters read
is also typed, which is why you got a '27'
before your responses.
#log
#next
4.1a 10
4.2a 5