How to execute external program and process its output?

BCS BCS at pathlink.com
Mon Jul 31 16:49:26 PDT 2006


Marcin Kuszczak wrote:
> BCS wrote:
> 
> 
>>Marcin Kuszczak wrote:
>>
>>>Hello!
>>>
>>>I am trying to execute external command from D program, and then process
>>>its output. spawnvp() doesn't seem to be enough as it does not return
>>>output, but just status as int.
>>>
>>>How to achieve it in D (I don't know method also in C(++), so even this
>>>will help <g>)?
>>>
>>>---
>>>Regards
>>>Marcin Kuszczak
>>>(Aarti_pl)
>>
>>
>>IIRC somewhere back a few months ago, someone made a stream object that
>>did just what you want. You could even write to the program's standard
>>input by outputting to the stream.
> 
> 
> How to find it? is it somewere on Wiki?
> 

These look somewhat like what I remember.

http://www.digitalmars.com/d/archives/digitalmars/D/29556.html
http://www.digitalmars.com/d/archives/digitalmars/D/learn/542.html



More information about the Digitalmars-d-learn mailing list