How to start new command with arguments, pass data to its stdin read its output?

denizzzka 4denizzz at gmail.com
Tue Oct 23 05:29:59 PDT 2012


On Tuesday, 23 October 2012 at 12:19:08 UTC, Adam D. Ruppe wrote:
> On Tuesday, 23 October 2012 at 11:34:35 UTC, denizzzka wrote:
>> Something like execv() but with stdin/stdout?
>
> If you're on linux i have a little file that might help:
>
> http://arsdnet.net/dcode/exec.d
>
> int exec(
>    string program,
>    string[] args = null,
>    string input = null,
>    string* output = null,
>    string* error = null,
>    string[] environment = null);

Thanks! It is suitable for my case.

I think something like this should be in the standard library.


More information about the Digitalmars-d-learn mailing list