Get system command output: Difference between revisions

Line 199:
:search t :output :stream :wait nil))
(read-line (sb-ext:process-output *my-proc*) nil)</lang>
 
=={{header|D}}==
<lang D>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);
}
}</lang>
 
{{out}}
<pre>Output: hello</pre>
 
=={{header|FreeBASIC}}==
1,452

edits