File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / usr.lib / learn / editor / L37.2a
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
A range of line numbers can be used with the substitute
command as with the print command.  For example,

$-4,$s/cat/&s/p

will change "cat" into "cats" on the last five lines of
a file.  In this directory there is a file "cliche"
containing a number of instances of the word "dog"; change
the instances of "dog" in the first five lines to "dogs".
Then rewrite the file and type "ready".
#create Ref
dogs tired
sick as a dogs
dogs eared
wouldn't send a dogs out on a night like this
every dogs has his day
dog gone
#create cliche
dog tired
sick as a dog
dog eared
wouldn't send a dog out on a night like this
every dog has his day
dog gone
#user
#cmp cliche Ref
#log
#next
37.2b 5

unix.superglobalmegacorp.com

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