DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Writing Deskshell commands

Pipelines

Two commands can be linked by a pipeline using the ``|'' operator. The two commands will be executed in separate new threads, and the output of the first command will become the input to the second command.

When a pipeline is executed, Deskshell waits for all the ``children'' (commands in the pipeline) to terminate. The individual statuses are converted to strings, and these are all stored in the variable status, in the same order as the commands in the pipeline. For example, the pipeline true | false generates the status ``(0 1)''.

The ``|'' can be followed by a construct to specify the output and input file descriptors to be used, as in:

   |[output=input]
In this case the brackets are part of the operator. If =input is omitted it defaults to ``0''.

See also:


Next topic: List mark
Previous topic: Command terminators

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 26 May 2005