How do I get the output of the time bash command?

Ferhat Kurtulmuş aferust at gmail.com
Wed Jan 27 11:13:32 UTC 2021


On Wednesday, 27 January 2021 at 09:35:21 UTC, Anthony wrote:
>
> I'm trying to read the timed output of a pipeShell command but 
> it only results in empty output.
>
> Does anyone know why this is?
>
>
> ```
>     auto p = pipeShell("time ls");
>
>     foreach(str; p.stdout.byLine) {
>         writefln("%s",str);
>     }
> ```

Probably, just getting a string output is not enough. It looks a 
little outdated, but there is this library:

https://code.dlang.org/packages/dexpect


More information about the Digitalmars-d-learn mailing list