8 pipeby - Run a command and pipe its output to an other one
12 pipeby I<CMD_1> [I<ARGS>] -- I<CMD_2> [I<ARGS>]
16 Equivalent to this shell command:
20 The first command's (I<CMD_1>) arguments can not contain a double-dash (C<-->),
21 because it's the command separator for pipeby(1).
22 However, since only a total of 2 commands are supported,
23 arguments for I<CMD_2> may contain double-dash(es).
25 You can chain pipeby(1) commands together to get a pipeline equivalent to
26 C<CMD_1 | CMD_2 | CMD_3>, like:
28 pipeby CMD_1 -- pipeby CMD_2 -- CMD_3
32 It's sometimes more convenient to don't involve shell command-line parser.
64 if [ ".$1" = '.--' -a $cmd_n == 1 ]
68 eval "cmd_${cmd_n}+=(\"\$1\")"
73 "${cmd_1[@]}" |
"${cmd_2[@]}"