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

#print
To move around, you can use simple arithmetic
when specifying what to print.  For example,
  3+1p
is the same as
  4p
as an editor command.  Now that's not very interesting;
but if the '.' current line pointer is line 3,
then using
  .+1p
instead of 4p is helpful.
For example, print the 3rd and 4th
lines of the familiar file using first "3p" to
get to line 3 and then ".+1p" to print the next line.
End as usual with w, q, and ready.
#create Ref
:thomas jefferson
:james madison
:"file" 6 lines, 91 characters
#create file
george washington
john adams
thomas jefferson
james madison
james monroe
john quincy adams
#copyout
#pipe
ex +'set prompt noopt open' file
#user
#unpipe
#uncopyout
tail -3 .ocopy >X1
#cmp Ref X1 3
#log
#next
9.1a 10
8.1b 7

unix.superglobalmegacorp.com

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