dgsh-enumerate − enumerate an arbitrary number of output channels
dgsh-enumerate [n]
dgsh-enumerate will output a single newline-terminated ascending integer on each one of its output channels. If the number of channels is not specified, the command will allow its downstream processes to specify the number and use that one.
The command demonstrates the dgsh negotiation API. It can also be used as a debug tool.
Enumerate the specified four output streams.
$ dgsh -c ’dgsh-enumerate 4 | cat’ 0 1 2 3
Enumerate the two output streams required by the downstream multipipe block.
$ dgsh -c ’dgsh-enumerate | {{ sed "s/^/A /" & sed "s/^/B /" & }} | cat’ A 0 B 1
dgsh(1), dgsh_negotiate(3).
Diomidis Spinellis — <http://www.spinellis.gr>