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
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.
or
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.
ghsdmr IOhannes