This program is used to combine multiple input data sources into a single output stream. The most common use is combining multiple commands into a single output for a pipeline. Output is written to standard output for pipeline usage.
Usage
da.multiplex <input …>
Arguments
Each argument specifies an input to be combined into the final output. Unless a special condition is met, the input is treated as a file name to read data from.
The accepted special conditions are:
- The argument starts with
|
(a pipe) -
It is treated as a command evaluated with the shell. This mode allows multiple commands to be multiplexed together to create a final output.
- The argument is exactly
-
(a single dash) -
The multiplexer will also read standard input and combine that with any other explicit inputs. This mode allows it to be used to multiplex streams as part of a pipeline.
- The argument is exactly
--
(two dashes) -
The multiplexer will ignore the
--
but treat all further arguments as files, regardless of the special conditions above.
Examples
- Combining files
-
This multiplexes two files together to generate an output.
da.mulitplex first_file.c3d second_file.c3d > combined.c3d
- Combining commands
-
This combines two commands into a single output.
da.multiplex '| da.get bnd BsG_S11 2016-05-01 1d' '| da.get mlo BsG_S11 2015-05-01 1d' | da.export
- Standard input and a file
-
This combines standard input an a file into the output
da.get bnd BsG_S11 2016-05-01 1d | da.multiplex - -- first_file.c3d