22 Apr 2009 23:13
pipe chain
Lasse Kliemann <lasse-list-gauche-2009 <at> mail.plastictree.net>
2009-04-22 21:13:17 GMT
2009-04-22 21:13:17 GMT
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
------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________(Continue reading)
RSS Feed