4.3BSD-UWisc/lib/learn/editor/L20.01a

#print
Now that you know how to delete lines,
you may eventually delete some by mistake.
If you just deleted some lines, you can always recover them
with the 'u' command.  For example,

  1,5d
  u

will delete the first 5 lines and then 'undo' that change.

I will put you in the editor with a file called 'colors'.
Print its contents, then delete the first 5 lines
and issue the 'undo' command.  Print the
file again to make sure that it's all there, rewrite the file,
quit, and type 'ready'.
#create Ref
red
yellow
blue
green
purple
brown
orange
#create colors
red
yellow
blue
green
purple
brown
orange
#copyin
#pipe
ex +'set prompt noopt open' colors
#user
#unpipe
#uncopyin
(diff Ref colors || grep 1,5d .copy) > /dev/null
#log
#next
20.01b 10