Re: pipeProcess output to hash string

2023-09-12 Thread user1234 via Digitalmars-d-learn
On Monday, 11 September 2023 at 22:08:54 UTC, Christian Köstlin wrote: Just three remarks: First I would recommend to use `std.process : execute` instead of `pipeProcess` in this usecase, as this will wait properly for the process to exit and it also will collect its output. Second its alway

Re: pipeProcess output to hash string

2023-09-11 Thread vino via Digitalmars-d-learn
On Monday, 11 September 2023 at 22:08:54 UTC, Christian Köstlin wrote: On 09.09.23 17:44, Vino wrote: Hi All,   Request your help on how to convert the output of std.process.pipeProcess to hash string ``` auto test(in Redirect redirect=Redirect.stdout | Redirect.stderr) {     import std

Re: pipeProcess output to hash string

2023-09-11 Thread Christian Köstlin via Digitalmars-d-learn
On 09.09.23 17:44, Vino wrote: Hi All,   Request your help on how to convert the output of std.process.pipeProcess to hash string ``` auto test(in Redirect redirect=Redirect.stdout | Redirect.stderr) {     import std.process;     import std.digest.crc;     import std.stdio: writeln;   

Re: pipeProcess output to hash string

2023-09-10 Thread Vino via Digitalmars-d-learn
On Saturday, 9 September 2023 at 16:49:30 UTC, user1234 wrote: On Saturday, 9 September 2023 at 15:44:44 UTC, Vino wrote: [...] With a slightly modified command line that works on linux here : ```d import std.process, std.stdio; auto test(in Redirect redirect=Redirect.stdout | Redirect.stde

Re: pipeProcess output to hash string

2023-09-09 Thread evilrat via Digitalmars-d-learn
On Saturday, 9 September 2023 at 16:49:30 UTC, user1234 wrote: not sure why you append "/?" to the program name. Windows maybe? Try this. auto result = std.process.pipeProcess(["whoami", "/?"], redirect);

Re: pipeProcess output to hash string

2023-09-09 Thread user1234 via Digitalmars-d-learn
On Saturday, 9 September 2023 at 15:44:44 UTC, Vino wrote: Hi All, Request your help on how to convert the output of std.process.pipeProcess to hash string ``` auto test(in Redirect redirect=Redirect.stdout | Redirect.stderr) { import std.process; import std.digest.crc; import

pipeProcess output to hash string

2023-09-09 Thread Vino via Digitalmars-d-learn
Hi All, Request your help on how to convert the output of std.process.pipeProcess to hash string ``` auto test(in Redirect redirect=Redirect.stdout | Redirect.stderr) { import std.process; import std.digest.crc; import std.stdio: writeln; result = std.process.pipeProcess