File:  [CSRG BSD Unix] / 43BSD / usr.lib / learn / editor / L72.1a
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
A command related to the global command is the 'v' command.
It also selects lines on which a second command is executed; the
difference between 'g' and 'v' is that the selected lines
for the 'v' command are all those on which the expression
is NOT found.  Thus
  v/abc/s/x/y/g
changes 'x' to 'y' on all lines NOT containing an 'abc'.
There is a file 'price' in this directory.  Find all lines
that do NOT begin with blank and prefix three asterisks
to them.  Then rewrite the file and type "ready".
#create Ref
***beef
  shoulder 1.39/lb
  flank    1.59/lb
  sirloin  2.19/lb
  round    1.89/lb
***fish
  sword    3.99/lb
  cod      1.99/lb
  blues    2.49/lb
  stripers 3.49/lb
  flounder 2.99/lb
***pork
  shoulder  .89/lb
  loin     1.59/lb
  bacon    1.19/lb
#create price
beef
  shoulder 1.39/lb
  flank    1.59/lb
  sirloin  2.19/lb
  round    1.89/lb
fish
  sword    3.99/lb
  cod      1.99/lb
  blues    2.49/lb
  stripers 3.49/lb
  flounder 2.99/lb
pork
  shoulder  .89/lb
  loin     1.59/lb
  bacon    1.19/lb
#user
#cmp price Ref
#log
#next
73.1a 10

unix.superglobalmegacorp.com

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