4.3BSD-UWisc/lib/learn/editor/L50.1c

#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