Pipe process stdout to another process stdin?

S

SDS

Anyone know of a slick way to pipe the standard output of Process A
into the standard input of Process B (and then capture the standard
output of Process B)?

I've got it working with 2 Process objects, a thread that pushes A's
stdout into B's stdin via a looping structure, and a loop on the thread
where the processes were started from that captures the stdout from B.
I was hoping there was a cleaner way of doing this considering you can
do it all in one shot via the command line.

Ideas?

Thx in advance. =)
 
I

Ignacio Machin \( .NET/ C# MVP \)

hi,

No AFAIK, that is a pretty simple way though. why you want to change it?

cheers,
 
S

SDS

The only reason I'd want to change it is because I'm always looking for
better ways to do things. If there was a more direct solution, like
being able to connect the streams, it would take some of the
complication out of my current solution like, for example, the thread
management.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top