File:  [CSRG BSD Unix] / 43BSDReno / usr.bin / learn / learnlib / morefiles / L5.1c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:56 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43reno
BSD 4.3reno

#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.