|
From: Lasse K. <las...@ma...> - 2009-04-22 21:20:49
|
How can I connect serveral sub-processes by pipes, like in shell
I do with 'cmd1 | cmd2 | cmd3' ?
Best I came up with is:
(call-with-input-process
'("cmd1")
(lambda (pipe-left-end)
(call-with-output-process
'("cmd2")
(lambda (pipe-right-end)
(copy-port pipe-left-end pipe-right-end))))))
This seems to work. However, I do not see a way to redirect
stdout of 'cmd2' to stdin of a 'cmd3'.
I have the feeling, I'm missing something fundamental here.
Thanks for a hint!
Lasse
|