File:  [CSRG BSD Unix] / 43BSD / usr.lib / learn / editor / L30.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
Changing a whole line with the 'c' command is a slow way
to work when you only want to change a few letters.  The 's' (substitute)
command changes the letters within a line.  For example, the command
  s/abc/def/
will change a line reading
  xxxabc
into one reading
  xxxdef
by replacing the string 'abc' with 'def'.  Try the following sequence which
alters the first line of the file 'test' within this directory:

ex test
1p
s/months/years/
1p
wq
ready
#create Ref
Four score and seven years ago our
fathers brought forth ...
#create test
Four score and seven months ago our
fathers brought forth ...
#user
#cmp test Ref
#log
#next
30.2b 5

unix.superglobalmegacorp.com

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