bash: passing output from one program to another
sometimes you want to be able to pass output from one program to another, say from bash to php. There is a neat trick to do it. In php, we execute the bash script restartapache.
<?php
$command=”/usr/local/bin/restartapache {$_GET['server']}”;
exec($command, $output); foreach ($output as $v)
{ echo “$v <br/>”; }
?>
then in the bash, we write the output to a [...]
