executing shell commands.
| From: | IDS DM&DS) | Date: | Wed, 10 Sep 2003 15:49:02 +0000 |
| Subject: | executing shell commands. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-162181@lists.php.net to get a copy of this message | ||
I am executing the following within PHP -
$system = `/bin/ls /dcsa-ws1/share/webadm1/public_html/system-reports/security/rhosts/eqty |
/bin/egrep -v "server|header|index|report|php|old|title" | /bin/head -$x | /bin/tail
-1 | /bin/awk '{ print $1 }'` ;
$numlin =
/bin/cat
/dcsa-ws1/share/webadm1/public_html/system-reports/security/rhosts/eqty/$system | /bin/wc -l
;
The first line resolves correctly for the system name.
The $numlin does not appear to resolve correctly - appears to be an issues with passing the
$system variable in the the second line. Any ideas. Any feedback will be appreciated. Thanks.
Samir.