Commit | Line | Data |
---|---|---|
3eb5d546 C |
1 | |
2 | The "." operator can be used with multiple | |
3 | addresses to refer to the current line | |
4 | in either the first or second position (or both). | |
5 | For example, you could print from the current line | |
6 | to the 6th line with | |
7 | .,6p | |
8 | and similarly for any other line. I'll put | |
9 | you in the editor again, with the current line | |
10 | set in the middle of a short file; print from | |
11 | the current line position to the fifth line, and | |
12 | then type w, q and ready. | |
13 | #create Ref | |
14 | 2. UNIX | |
15 | 3. hardware | |
16 | 4. software | |
17 | 5. manuals | |
18 | 97 | |
19 | #create file | |
20 | 2. UNIX | |
21 | 3. hardware | |
22 | 4. software | |
23 | 5. manuals | |
24 | you shouldn't have printed this line. | |
25 | #copyout | |
26 | #pipe | |
27 | ed file | |
28 | 1t1 | |
29 | #user | |
30 | #unpipe | |
31 | #uncopyout | |
32 | tail -5 .ocopy >X1 | |
33 | #cmp X1 Ref | |
34 | #log | |
35 | #next | |
36 | 9.2e 5 |