Execute a system command: Difference between revisions

pike
(pike)
Line 471:
 
See also: [http://us.php.net/manual/en/function.proc-open.php proc_open()]
 
=={{header|Pike}}==
<lang pike>import Process;
 
int main(){
// This appears to only work in Pike >= 7.8 :(
string response = run("ls");
// response is now a map containing 3 fields
// stderr, stdout, and exitcode. We want stdout.
 
write(response["stdout"] + "\n");
}</lang>
 
=={{header|Pop11}}==
Anonymous user