Bell 32V development
[unix-history] / usr / lib / learn / editor / L35.2d
CommitLineData
fed84c9b
TL
1#print
2A useful operation is to replace a string of several blanks
3by exactly one blank. Note that you can't just write
4
5s/ */ /
6
7because the " *" willl match any number of blanks
8including zero. Thus it will always match at the beginning
9of the line, even if there is no blank there.
10The normal sequence is
11
12s/ */ /
13which will only substitute for a string
14that has at least one blank in it.
15Try that command on the line in the file "line".
16Then rewrite the file "line" and type "ready".
17#create Ref
18here is a long space.
19#create line
20here is a long space.
21#user
22#cmp line Ref
23#log
24#next
2535.2e 5