[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plumbing



Garath spake:
> It would be useful to be able to distinguish between
> the two kinds of output; but you don't just want to send them
> to different places, because you want to keep the two
> synchronised.

Bzzt! You're onto something of a loser here already, because
once the output from the fds enters the realm of pipes, you're
into buffering issues, and you lose the synchronisation.

Paul responded thus:
> Not crazy.  It's just that the number of times it actually would be used
> is probably pretty rare.

Indeed. I'd say that es just isn't really the tool for this job. It
gives you enough control over fds to do most things you're likely to
think of, but isn't willing to strangle itself in the process. So,
no circular pipes, for example.

If you really want to go with this, I'd suggest dropping elegance and
going for practicality. Perl's IPC::Open3 module will give the
functionality you require, and Perl is always great for those one-off
jobs that aren't worth breaking out the C compiler for...

steve