Teachers Paradise School Supplies Teacher Resources Free Encyclopedia
Teachers Paradise FREE Teaching Resources
Home Arts Crafts Audio Visual Equipment Office Supplies Teacher Resources
Main Page | Edit this page

Pipes and filters

Pipes and filters is a software design pattern invented by Douglas McIlroy. Its inclusion on the Unix operating system was the first implementation of his vision of software componentry.

In the context of Unix operating systems, a pipe signifies that the output of one program feeds directly as input to another program. The Unix shell uses the pipe character (|) to join programs together. A sequence of commands joined together by pipes is known as a pipeline. For creating this mechanism, all Unix tools have access to three distinct files:

By joining one tool's stdout to another tool's stdin, a pipeline is formed. Errors are sent to a side track and accumulated.

Often filter programs form the constituent programs in a pipeline.

An example of a pipeline:

cat * | grep "alice" | grep -v "wonderland" | wc -l

will print out the number of lines in all files in the current directory which contain the text "alice", but not the text "wonderland".

The pipeline has four parts:

Pipes and filters can be viewed as a form of functional programming, using byte streams as data objects.



Pay for Educational Supplies & Teaching Supplies with Visa, Master Card, American Express, Discover or Paypal.
TeachersParadise.com HOME | Safe Shopping Guarantee | Help Desk
All trademarks & brands are the property of their respective owners.
Legal Notice 2000-2008 TeachersParadise.com, Inc. All Rights Reserved