summaryrefslogtreecommitdiff
path: root/usr.bin/learn/lib/editor/L50.1c
blob: 3ed8c33e157ec7b4de5aab5154734b718be036da (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#print
You can use other commands than 'p' with these
context search addresses, of course.  For example,
 /abc.e/s/ab/xx/p
will
 (1) search for the next line containing the
     expression "abc.e", which matches any line that
     has an 'a', then a 'b', then a 'c', then
     anything, then an 'e' (so that it matches
     "abcde", "abcxe", "abc9e", but not "abceq");
 (2) on that line, change the first "ab" to an "xx".
Edit file 'county'; find the line with 'pacific' on it
and change it to 'ocean'.  Then rewrite the file
and type "ready".
#create Ref
passaic
bergen
sussex
hudson
essex
warren
morris
hunderdon
somerset
union
ocean
monmouth
middlesex
mercer
cumberland
cape may
#create county
passaic
bergen
sussex
hudson
essex
warren
morris
hunderdon
somerset
union
pacific
monmouth
middlesex
mercer
cumberland
cape may
#user
#cmp county Ref
#log
#next
51.1a 10
50.2e 5