When I execute my command in PHP with shell_exec
it always returns an empty string. I tried shell_exec('ls -l');
and it works. I put the command as a separate file and still same result.
$shellOutput = shell_exec("pacmd list-sinks | grep 'volume: 0:' | tail -1 | awk '{ print $3 }'");
//return execute status;
echo trim($shellOutput);