run-pipeline ( seq -- results )
Pipes

Prev:<pipe> ( encoding -- stream )


Vocabulary
io.pipes

Inputs
seqa sequence of pipeline components


Outputs
resultsa sequence of pipeline results


Word description
Creates a pipe between each pipeline component, with the output of each component becoming the input of the next.

The first component reads input from input-stream and the last component writes output to output-stream.

Each component runs in its own thread, and the word returns when all components finish executing. Each component outputs a result value.

Pipeline components must be one of the following:
A quotation. The quotation is called with both input-stream and output-stream rebound, except for the first and last pipeline components, and it must output a single value.
A process launch descriptor. See Launch descriptors.


Examples
Print the lines of a log file which contain the string "error", sort them and filter out duplicates, using Unix shell commands only:
{ "cat log.txt" "grep error" "sort" "uniq" } run-pipeline


Definition