BSD 3 development
[unix-history] / usr / lib / learn / editor / L36.2c
CommitLineData
fd15fd37
BJ
1#print
2On the right side of a substitute, none of the other
3special characters mean anything unusual. Thus, if you wanted to
4replace the letter 'a' by an asterisk, for example, the obvious
5com and would work:
6
7s/a/*/p
8
9Try, in the file "data", replacing the comma on the last line
10with a period. Then rewrite the file and type "ready".
11#create Ref
12 Square Roots
131.00 1.00
142.00 1.42
153.00 1.73
164.00 2.00
17You really shouldn't be
18printing all of this file -
19did you forget that '$' is
20the address of the last
21line of a file?
22Use that instead of printing everything.
235.00 2.23
246.00 2.45
257.00 2.65
268.00 2.83
27#create data
28 Square Roots
291.00 1.00
302.00 1.42
313.00 1.73
324.00 2.00
33You really shouldn't be
34printing all of this file -
35did you forget that '$' is
36the address of the last
37line of a file?
38Use that instead of printing everything.
395.00 2.23
406.00 2.45
417.00 2.65
428.00 2,83
43#user
44#cmp data Ref
45#log
46#next
4736.2d 5