Re: shell_exec with pipes
| From: | Aaron Gould | Date: | Tue, 11 Nov 2003 16:23:21 +0000 |
| Subject: | Re: shell_exec with pipes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169182@lists.php.net to get a copy of this message | ||
Have you tried escaping the pipes and quotes? Try this:
$var=shell_exec("/usr/local/bin/mplayer -identify -frames 0 /tmp/pitstop.mpeg 2>/dev/null\| grep ID_LENGTH \| cut -d \"=\" -f 2");
Mario Ohnewald wrote:
$var=shell_exec("/usr/local/bin/mplayer -identify -frames 0 /tmp/pitstop.mpeg 2>/dev/null| grep ID_LENGTH | cut -d "=" -f 2");