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

#print
You can use all the special characters in the
search commands.  For example,
 /^cat/p
prints the first line that BEGINS with 'cat'.
You can even leave out the 'p':
 /^cat/
does the same thing.

Now go into file "text" with the editor and
print the first line that ENDS with 'dog'.
Then leave the editor and type 'ready'.
#create Ref
:the right dog
#create text
This is a file which
contains several occurrences
of the word 'dog' in several
places.  It would be a doggone
shame if you didn't find
the right dog
to print out.
#copyout
#user
#uncopyout
grep 'dog' .ocopy >X3
tail -1 X3 >X2
#cmp Ref X2
#log
#next
50.1c 10
50.2c 5