On Tue, Dec 16, 2014 at 4:35 PM, Nicholas Leippe <[email protected]> wrote:
>
> "${!var}"
> *Expand the value of the parameter named by the value of the parameter
> var*.
> This is *bad practice*! This expansion makes your code highly
> non-transparent and unpredictable in the future. You probably want an
> associative array instead.
>
Thanks for the explanation. The script is from a Nagios plug-in I found on
the Nagios exchange. I hadn't seen the "!" in the "${!var}" expression
before and couldn't find reference to it in my books or online. I think
I'll just take it out and modify it to something that works and makes sense
for my purpose.
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/