Commit | Line | Data |
---|---|---|
fd15fd37 BJ |
1 | |
2 | To avoid just accumulating lines forever, you need some | |
3 | way of getting rid of them. The 'd' command (delete) removes | |
4 | lines you don't want. Since it also removes lines that | |
5 | you do want if you tell it to, you should be careful | |
6 | with this command. Deleting one line at a time | |
7 | is always pretty safe. For example | |
8 | 5d | |
9 | will delete line 5 of a file. Try the following | |
10 | sequence; note that I've used "cat" | |
11 | for a change. | |
12 | ||
13 | cat bmt | |
14 | ed bmt | |
15 | 5d | |
16 | w | |
17 | q | |
18 | cat bmt | |
19 | ready | |
20 | #create Ref | |
21 | 14th st | |
22 | 23rd st | |
23 | 28th st | |
24 | 34th st | |
25 | times square | |
26 | 49th st | |
27 | 57th st | |
28 | #create bmt | |
29 | 14th st | |
30 | 23rd st | |
31 | 28th st | |
32 | 34th st | |
33 | 42nd st | |
34 | times square | |
35 | 49th st | |
36 | 57th st | |
37 | #user | |
38 | #cmp bmt Ref | |
39 | #log | |
40 | #next | |
41 | 19.3b 3 | |
42 | 19.2c 8 |