Possible Duplicate:
pass parameters to php with shell
I am running a php script within shell script as
#! /bin/sh
php file.php
Shell will run the script and display the output of the php script, but how can I pass variable defined within php script into shell script to be used therein (for further processing by shell)?
For example, consider a php file of
<?php
$test = "something";
?>
How can I pass the value of $test to the shell script as
#! /bin/sh
php config.php
echo $test
UPDATE: The methods suggested are based on printing the variables. I prefer not to print out anything, as the php script has other applications too (to be included in other php scripts).