File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / usr.lib / learn / editor / L42.1a
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

#print
Normally the 's' command only changes
the first instance on a line of the expression
it is looking for.  Sometimes you want to change
more than one instance.  If you put a 'g' after the
command, as in
  s/cat/dog/g
all instances of 'cat' will be changed to 'dog'. To
print the result you must say
  s/cat/dog/gp
('pg' at the end doesn't work, sorry).
Edit file 'stuff' in this directory to change every
instance of 'green' to 'red' on every line.
Then rewrite the file and type "ready".
#create Ref
red light, village red
red book, red paper, red pencil
red car, red sign, redhorn
#create stuff
green light, village green
green book, green paper, green pencil
green car, green sign, greenhorn
#user
#cmp stuff Ref
#log
#next
43.1a 10
43.2a 5

unix.superglobalmegacorp.com

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