Re: Passthru with Grep and Awk?

From: Date: Thu, 15 Jan 2004 23:15:36 +0000
Subject: Re: Passthru with Grep and Awk?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-174729@lists.php.net to get a copy of this message
On Friday 16 January 2004 06:06, Carlton L. Whitmore wrote: > I'm having problems getting the following passthru statement to work. It > works fine with the just the grep command. > Help!!!! > > <?php > echo "<pre>\n"; > passthru('/usr/bin/grep " c=2048" " c=32" " c=2" > /var/log/messages | > /usr/bin/awk "{print $1 $3 $5}" '); > ?> 1) Is grep " c=2048" " c=32" " c=2" /var/log/messages a valid command? My version of grep only allows a single search pattern. 2) Do you have the necessary permissions to access '/var/log/messages' ? -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* I know not how I came into this, shall I call it a dying life or a living death? -- St. Augustine */

« previous php.general (#174729) next »