Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
12
Task/Get-system-command-output/D/get-system-command-output.d
Normal file
12
Task/Get-system-command-output/D/get-system-command-output.d
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import std.process;
|
||||
import std.stdio;
|
||||
|
||||
void main() {
|
||||
auto cmd = executeShell("echo hello");
|
||||
|
||||
if (cmd.status == 0) {
|
||||
writeln("Output: ", cmd.output);
|
||||
} else {
|
||||
writeln("Failed to execute command, status=", cmd.status);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue