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

#print
Another use for pipes is to replace a command sequence that we
did earlier with "cat", "pr" and a temporary file.  If you have
a bunch of small files, using "pr" on them directly wastes
paper, since each file takes a page.  You could say
  cat memo* >temp
  pr temp
  rm temp
but this is a nuisance (and the output will
have the title "temp" on each page).  So use
a pipe instead.
In this directory there are some files whose
names begin with "word".  Use "cat", "pr" and a pipe
to print them, then type "ready".
#create word1
now
is
the
time
for
all
#create word2
good
men
to
come
to
the
aid
#create word3
of
their
party.
#copyin
#user
#uncopyin
grep 'cat word.*| *pr' <.copy >/dev/null
#log
#next
5.1d 10

unix.superglobalmegacorp.com

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