File:  [CSRG BSD Unix] / 43BSDTahoe / usr.lib / learn / editor / L50.1b
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:58 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43tahoe
BSD 4.3tahoe

#print
You can use all the special characters in the
search commands.  For example,
 /^cat/p
prints the first line that BEGINS with 'cat'.
You can even leave out the 'p':
 /^cat/
does the same thing.

Now go into file "text" with the editor and
print the first line that ENDS with 'dog'.
Then leave the editor and type 'ready'.
#create Ref
:the right dog
#create text
This is a file which
contains several occurrences
of the word 'dog' in several
places.  It would be a doggone
shame if you didn't find
the right dog
to print out.
#copyout
#user
#uncopyout
grep 'dog' .ocopy >X3
tail -1 X3 >X2
#cmp Ref X2
#log
#next
50.1c 10
50.2c 5

unix.superglobalmegacorp.com

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