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

#print
Often you want to refer to the last line
of a file, and you don't know how long it is.
There is a special address, "$" for this purpose.
"$" refers to the end of a file.  Thus
  $p
prints the last line of a file and
  1,$p
prints all of a file.
Here's another file.  Print all of it, and
then type the usual w, q, and ready.
Your commands should look like
  1,$p
  w
  q
  ready
#create Ref
1,$p
w
q
#create file
New York Mets Managers
 Casey Stengel
 Wes Westrum
 Gil Hodges
 Yogi Berra
 Roy McMillan
#copyin
#pipe
ex +'set prompt noopt open' file
#user
#unpipe
#uncopyin
tail -3 .copy >X1
#cmp X1 Ref
#log
#next
10.1b 10
10.2b 5

unix.superglobalmegacorp.com

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