summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/editor/L19.2a
blob: 263d6b086d900328e725a1247125c3717b10e67a (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
#print
To avoid just accumulating lines forever, you need some
way of getting rid of them.  The 'd' command (delete) removes
lines you don't want.  Since it also removes lines that
you do want if you tell it to, you should be careful
with this command.  Deleting one line at a time
is always pretty safe.  For example
  5d
will delete line 5 of a file.  Try the following
sequence; note that I've used "cat"
for a change.

cat bmt
ed bmt
5d
w
q
cat bmt
ready
#create Ref
14th st
23rd st
28th st
34th st
times square
49th st
57th st
#create bmt
14th st
23rd st
28th st
34th st
42nd st
times square
49th st
57th st
#user
#cmp bmt Ref
#log
#next
19.3b 3
19.2c 8