Re: exec() function question on Solaris

From: Date: Thu, 18 Jul 2002 23:19:21 +0000
Subject: Re: exec() function question on Solaris
Groups: php.general 
Request: Send a blank email to php-general+get-108377@lists.php.net to get a copy of this message
>I have an interesting question. I am working on a system that I need to >run two commands in the shell, but when I use passthru() on the first >command then run the second command to get the results from the first >command, it doesn't work. Is there any way I can run 2 shell commands in >the same execution space so that I can get the results from the first >becaus eI think it is running them separately so when I try to pull the >results, it has no results to pull. Does this make sense? any >suggestions? First suggestion: passthru($command1 | $command2); Second suggestion: Use named pipes. Third suggestion: Use exec() and get the results from the shell, then pass them back out to the second command. Fourth suggestion: Write a shell script that does both commands in one, with suitable arguments for your needs. Fifth suggestion: Re-read http://php.net/passthru :-) -- Like Music? http://l-i-e.com/artists.htm

« previous php.general (#108377) next »