File:  [CSRG BSD Unix] / 43BSD / usr.lib / learn / editor / L13.2a
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:55 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

#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

unix.superglobalmegacorp.com

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