Start development on BSD 4_1_snap
[unix-history] / .ref-79029c32280d78322b4fb003d1cf99489dda7f1c / .ref-BSD-3 / usr / lib / learn / editor / L30.2a
CommitLineData
007f9fd0
BJ
1#print
2Changing a whole line with the 'c' command is a slow way
3to work when you only want to change a few letters. The 's' (substitute)
4command changes the letters within a line. For example, the command
5 s/abc/def/
6will change a line reading
7 xxxabc
8into one reading
9 xxxdef
10by replacing the string 'abc' with 'def'. Try the following sequence which
11alters the first line of the file 'test' within this directory:
12
13ed test
141p
15s/months/years/
161p
17w
18q
19ready
20#create Ref
21Four score and seven years ago our
22fathers brought forth ...
23#create test
24Four score and seven months ago our
25fathers brought forth ...
26#user
27#cmp test Ref
28#log
29#next
3030.2b 5