File:  [CSRG BSD Unix] / 42BSD / usr.lib / learn / morefiles / L5.1b
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD42
BSD 4.2

#print
It seems silly to use a temporary file when all that's really
needed is to take the output from one program like "ls",
and pass it directly to the input of another, like "wc".
One of the original contributions of Unix is a clean
way to do this, called a "pipe".  You can connect two
programs with a pipe like this:
  ls | wc
and the output of the first program goes into the input of
the second without any intervening file.

Try this pair of commands in a pipeline.
Try an ordinary "ls" command too, to verify that you
got the right answer.  Then type "ready".
#create X1
#copyin
#user
#uncopyin
grep 'ls *| *wc' .copy >/dev/null
#log
#next
5.1c

unix.superglobalmegacorp.com

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