Joined: July 2006
||Posted: Jan. 31 2008,16:58
|Quote (Zucca @ Jan. 31 2008,10:06)|
|Quote (^thehatsrule^ @ Jan. 30 2008,14:23)|
|I think that's because $() uses a subshell in order to execute the command substitution... so the variable is lost afterwards.|
But I don't have any "$(command)" there.
I read that to set the variable local only you must use local -command.
But if it is really lost somewhere, is there a way to pass it to the outer process?
Well, `` does the same thing as $() or maybe you weren't looking where parsememinfo was being called (in the memfree function)?
It's not local variables that you are looking at right now... it's the child subshell(?) that cannot pass a variable (directly) to a parent - hence my original suggestion.