blob: d92b66952c16d7c5421ef551e4d95a43f3706a66 (
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
|
#print
A useful operation is to replace a string of several blanks
by exactly one blank. Note that you can't just write
s/ */ /
because the " *" willl match any number of blanks
including zero. Thus it will always match at the beginning
of the line, even if there is no blank there.
The normal sequence is
s/ */ /
which will only substitute for a string
that has at least one blank in it.
Try that command on the line in the file "line".
Then rewrite the file "line" and type "ready".
#create Ref
here is a long space.
#create line
here is a long space.
#user
#cmp line Ref
#log
#next
35.2e 5
|