On Mon, Jul 25, 2011 at 8:33 PM, Linda Walsh <[email protected]> wrote:
> Pierre Gaston wrote:
>> Since you are already using global variables, why not simply use a
>> couple more for the return values?
>>
> ---
> Because a subshell cannot access the global variables of the
> parent.
uh? you don't make sense.
1) a subshell can access the parent variables just fine
2) your intial problem was to avoid the subshell of your solution to
be able to use global variables
I'm just saying : foo () { ret1=blah;ret2=bleh; }; foo;echo $ret1 $ret2