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

#print
Remember we said that you didn't have to know the
number of the last line, because '$' could
always be used for that.  What if you want to know
how long the file is?  Well, the editor command
  $=
will tell you what '$' is set to, i.e. the number of
lines in the file.  You can find the number of lines in
any file, then, by editing it and then typing "$=".
(You then must leave the editor with the usual wq).
How many lines are there in file 'henry'?  You may want to check
by listing the file with "cat" as well as by using "$="
in the editor.  Don't forget to leave the editor with
the usual 'wq'; eventually, type "answer N"
where N is the number of lines.
#create henry
Murray Hill
Holmdel
Whippany
Madison
Piscataway
Chester
Warren
#copyin
#user
#uncopyin
#match 7
#succeed
Of course the editor announced this fact when you first entered it.
"$=" is most useful when the number of lines changes during a session.
#log
#next
13.3a  10