[PD] Execute command from Pd

IOhannes m zmoelnig zmoelnig at iem.at
Mon May 29 11:35:55 CEST 2017

On 2017-05-29 11:05, Jack wrote:
> Something like this ? :
> [netreceive -u 5678]
> |
> [print]
> You can also add 2>&1 if you want to redirect error. This could give
> something like :
> $ ls 2>&1 | pdsend 5678 localhost udp
> or


$ (./test.sh | pdsend 7777 localhost udp) 2>&1 | pdsend 7778 localhost udp

this will give you the stdout on port 7777, and the stderr on 7778.


using the `annotate-output` program (on a Debian system you can get this
from the `devscripts` package):

$ annotate-output + ./test.sh | pdsend 7777 localhost udp

this will prefix the output with "O:" (for stdout) and "E:" (for
stderr), so you can simply use [route O: E:] to distinguish between the
two streams.
it also sends some informational (prefix "I:") data, from which you can
get the exitcode of the program (once it finishes).
in the above example, i suppressed all timestamping. omit the "+" if you
want timestamps as well.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170529/ecac326a/attachment.sig>

More information about the Pd-list mailing list