4.3BSD-UWisc/lib/learn/editor/L13.2a

#print
Remember that "$" is the last line in
the current file.  Suppose you want to
know how long the file is, i.e. what the
number of the last line is.  The command
  $=
will tell you that.  So you can find the length
of the file "data" by saying in the editor
  $=
  wq
Try that; then check by listing the file
with "cat" to see how long it is.  Then type
"ready".
#create data
This is the file
which you should
find the number
of lines in by
typing "$=" in
the editor and see
that it has exactly
nine lines in it
when printed.
#copyout
#pipe
ex +'set prompt noopt open' data
#user
#unpipe
#uncopyout
grep ':9' .ocopy >/dev/null
#log
#next
13.2b 5