File:  [CSRG BSD Unix] / 43BSDTahoe / usr.lib / learn / editor / L18.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
Once in a while you want to add text just before
a certain line, rather than just after it.  For this purpose
there is a command 'i' (insert) which is just like 'a'
except that the new material goes before the addressed line,
instead of after it.  For example,
  3i
is the same as
  2a
Try this sequence, which prints the editor buffer before
and after the insertion, to see what happens.

ex cars
1,$p
3i
lincoln
chevrolet
.
1,$p
wq
ready
#create Ref
ford
mercury
lincoln
chevrolet
buick
pontiac
oldsmobile
#create cars
ford
mercury
buick
pontiac
oldsmobile
#user
#cmp cars Ref
#log
#next
18.2c 7
18.3a 3

unix.superglobalmegacorp.com

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