File:  [CSRG BSD Unix] / 42BSD / usr.lib / learn / editor / L10.3f
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD42
BSD 4.2

#print
How would you print from the first line of a file to
the next to last line (thus printing all but the last
line of something)?  I'll put you in the editor - do that
and then type the usual w, q and ready.
#create Ref
:Boroughs
  Manhattan
  Brooklyn
  Queens
  the Bronx
  Staten Island
:"file" 7 lines, 92 characters
#create file
Boroughs
  Manhattan
  Brooklyn
  Queens
  the Bronx
  Staten Island
Don't print this line!
#copyout
#pipe
ex +'set prompt noopt open' file
#user
#unpipe
#uncopyout
tail -7 .ocopy >X1
#cmp X1 Ref 7
#log
#next
10.1b 5

unix.superglobalmegacorp.com

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