How can I get value of a variable defined in a shell script? (the script is a configuration file, only contains variable-definitions) I cannot use "source" command in exec:
echo exec('var=2; echo $var'); //writes "2"
echo exec('source config.sh; echo $var'); //writes ""
How can I get value of variables defined in a shell script?