File:  [CSRG BSD Unix] / 43BSD / usr.lib / learn / editor / L36.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
So far all the special characters in the substitute
command are used to select the string to be replaced.
There is one character used in the new string to be inserted.
It is '&' which when used on the right hand side of a substitution,
refers to the expression given on the left hand side.
For example, the command

s/the/&m/

changes "the" into "them".  Try that on file "text";
then rewrite the file and type "ready".
#create Ref
we went to see them yesterday.
#create text
we went to see the yesterday.
#user
#cmp text Ref
#log
#next
36.2b 5

unix.superglobalmegacorp.com

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