Annotation of 43BSD/usr.lib/learn/editor/L13.1a, revision 1.1.1.1

1.1       root        1: #print
                      2: Remember we said that you didn't have to know the
                      3: number of the last line, because '$' could
                      4: always be used for that.  What if you want to know
                      5: how long the file is?  Well, the editor command
                      6:   $=
                      7: will tell you what '$' is set to, i.e. the number of
                      8: lines in the file.  You can find the number of lines in
                      9: any file, then, by editing it and then typing "$=".
                     10: (You then must leave the editor with the usual wq).
                     11: How many lines are there in file 'henry'?  You may want to check
                     12: by listing the file with "cat" as well as by using "$="
                     13: in the editor.  Don't forget to leave the editor with
                     14: the usual 'wq'; eventually, type "answer N"
                     15: where N is the number of lines.
                     16: #create henry
                     17: Murray Hill
                     18: Holmdel
                     19: Whippany
                     20: Madison
                     21: Piscataway
                     22: Chester
                     23: Warren
                     24: #copyin
                     25: #user
                     26: #uncopyin
                     27: #match 7
                     28: #succeed
                     29: Of course the editor announced this fact when you first entered it.
                     30: "$=" is most useful when the number of lines changes during a session.
                     31: #log
                     32: #next
                     33: 13.3a  10

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.