bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to do? Possible?


From: Pierre Gaston
Subject: Re: How to do? Possible?
Date: Mon, 25 Jul 2011 20:51:32 +0300

On Mon, Jul 25, 2011 at 8:33 PM, Linda Walsh <bash@tlinx.org> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]