Annotation of 42BSD/usr.lib/learn/editor/L13.2a, revision 1.1.1.1

1.1       root        1: #print
                      2: Remember that "$" is the last line in
                      3: the current file.  Suppose you want to
                      4: know how long the file is, i.e. what the
                      5: number of the last line is.  The command
                      6:   $=
                      7: will tell you that.  So you can find the length
                      8: of the file "data" by saying in the editor
                      9:   $=
                     10:   wq
                     11: Try that; then check by listing the file
                     12: with "cat" to see how long it is.  Then type
                     13: "ready".
                     14: #create data
                     15: This is the file
                     16: which you should
                     17: find the number
                     18: of lines in by
                     19: typing "$=" in
                     20: the editor and see
                     21: that it has exactly
                     22: nine lines in it
                     23: when printed.
                     24: #copyout
                     25: #pipe
                     26: ex +'set prompt noopt open' data
                     27: #user
                     28: #unpipe
                     29: #uncopyout
                     30: grep ':9' .ocopy >/dev/null
                     31: #log
                     32: #next
                     33: 13.2b 5

unix.superglobalmegacorp.com

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