[PHP] executing shell commands.

2003-09-10 Thread Sethi, Samir (IDS DMDS)
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

RE: [PHP] executing shell commands.

2003-09-10 Thread Sethi, Samir (IDS DMDS)
/public_html/system-reports/security/rhos ts/eqty/$system` ; Thanks. Samir. -Original Message- From: Curt Zirzow [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2003 12:15 PM To: '[EMAIL PROTECTED]' Subject: Re: [PHP] executing shell commands. * Thus wrote Sethi, Samir (IDS DMDS

[PHP] Shell question.

2003-09-10 Thread Sethi, Samir (IDS DMDS)
Another shell question - $system is set to eq-cca-u1.etsd.ml.com , Running the commands below should give sysnew as eq-cca-u1 , stripping out the etsd.ml.com. $sysnew = `echo $system | awk -F. '{ print $1 }'` ; echo sysnew = $sysnew ; However the echo statement returns sysnew as

[PHP] Shell question.

2003-09-10 Thread Sethi, Samir (IDS DMDS)
Anyone had a chance to look at this. Been trying different combinations, doesn't appear To work. Thanks. -Original Message- From: Sethi, Samir (IDS DMDS) [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 10, 2003 1:07 PM To: '[EMAIL PROTECTED]' Subject: [PHP] Shell question