On 5/1/10 6:19 PM, Freddy Vulto wrote:
> I have to give local variables a value (append an equal sign) in order
> to get them listed with 'local' in "blackbox()". Is there a bash
> builtin which lists all defined local variable names, even those not
> having a value yet?
A variable that has not
I would discourage the use of "l" (ell) as a variable name for readability.
I like the fact that _blackbox_called_by uses a parameter rather than
parsing the caller's name. This allows you to permit multiple callers
to a common private function, if needed. However, I'm assuming that
you will name
Here's another revised version.
I figured I could use bash internal `printf -v' just before the `eval'
to check if the variable name is a valid identifier. This should be an
exceptional case, so I don't mind doing this at the end of the function
- checking just before the eval. Now it's also eas