Re: Run a command-line process with data sent, and retrieve the data.

2022-06-10 Thread Christopher Katko via Digitalmars-d-learn
On Friday, 10 June 2022 at 17:49:20 UTC, Ali Çehreli wrote: On 6/10/22 10:40, Ali Çehreli wrote: >https://dlang.org/library/std/process/pipe_process.html I realized you may be happier with the following if all you need is stdout: https://dlang.org/library/std/process/execute.html

Re: Run a command-line process with data sent, and retrieve the data.

2022-06-10 Thread Ali Çehreli via Digitalmars-d-learn
On 6/10/22 10:40, Ali Çehreli wrote: >https://dlang.org/library/std/process/pipe_process.html I realized you may be happier with the following if all you need is stdout: https://dlang.org/library/std/process/execute.html https://dlang.org/library/std/process/execute_shell.html Ali

Re: Run a command-line process with data sent, and retrieve the data.

2022-06-10 Thread Ali Çehreli via Digitalmars-d-learn
On 6/10/22 10:37, Chris Katko wrote: > I want to pipe in string data to a shell/commandline program, then > retrieve the output. But the documentation I read appears to only show > usage for 'Files' for stdin/stdout/stderr. > > ala something like this: > D > string input = "hello\nworld"; >

Re: Run a command-line process with data sent, and retrieve the data.

2022-06-10 Thread Chris Katko via Digitalmars-d-learn
On Friday, 10 June 2022 at 17:37:30 UTC, Chris Katko wrote: I want to pipe in string data to a shell/commandline program, then retrieve the output. But the documentation I read appears to only show usage for 'Files' for stdin/stdout/stderr. ala something like this: D string input =

Run a command-line process with data sent, and retrieve the data.

2022-06-10 Thread Chris Katko via Digitalmars-d-learn
I want to pipe in string data to a shell/commandline program, then retrieve the output. But the documentation I read appears to only show usage for 'Files' for stdin/stdout/stderr. ala something like this: D string input = "hello\nworld"; string output; runProcess("grep hello", input,