User Tools

Site Tools


features:pipes

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
features:pipes [2015/12/29 20:16] adminfeatures:pipes [2015/12/29 20:20] admin
Line 15: Line 15:
 <code> <code>
 inputfile copy outputfile inputfile copy outputfile
- +</code>
-</file>+
  
 To make a pipeline, command operators could be stacked up. Thus, to sort //input,// paginate it neatly, and print the result off-line, one would write To make a pipeline, command operators could be stacked up. Thus, to sort //input,// paginate it neatly, and print the result off-line, one would write
Line 25: Line 24:
 In today's system, this would correspond to In today's system, this would correspond to
  
-<code> +<code>sort input | pr | opr
-sort input | pr | opr+
 </code> </code>
  
Line 61: Line 59:
  
 I mentioned above in the section on IO redirection that Multics provided a mechanism by which IO streams could be directed through processing modules on the way to (or from) the device or file serving as source or sink. Thus it might seem that stream-splicing in Multics was the direct precursor of Unix pipes, as Multics IO redirection certainly was for its Unix version. In fact I do not think this is true, or is true only in a weak sense. Not only were coroutines well-known already, but their embodiment as Multics spliceable IO modules required that the modules be specially coded in such a way that they could be used for no other purpose. The genius of the Unix pipeline is precisely that it is constructed from the very same commands used constantly in simplex fashion. The mental leap needed to see this possibility and to invent the notation is large indeed. I mentioned above in the section on IO redirection that Multics provided a mechanism by which IO streams could be directed through processing modules on the way to (or from) the device or file serving as source or sink. Thus it might seem that stream-splicing in Multics was the direct precursor of Unix pipes, as Multics IO redirection certainly was for its Unix version. In fact I do not think this is true, or is true only in a weak sense. Not only were coroutines well-known already, but their embodiment as Multics spliceable IO modules required that the modules be specially coded in such a way that they could be used for no other purpose. The genius of the Unix pipeline is precisely that it is constructed from the very same commands used constantly in simplex fashion. The mental leap needed to see this possibility and to invent the notation is large indeed.
 +
 +===== Dating the Creation of Pipes =====
 +
 +According to the [[:anecdotes:pipes|anecdotes]], Ken Thompson added pipes to Unix in one day.
  
features/pipes.txt · Last modified: 2022/09/16 18:47 by 123.219.209.121