>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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to