On Tue, Dec 09, 2014 at 08:55:02PM +0800, konsolebox wrote: > > declare -g "$var=$something" > > It actually should be completely avoided. eval is the right tool for > that job (besides a variable declared with -n in 4.3+).
Unfortunately, "declare -n" is the same as eval. We've had this discussion before, and I haven't changed my stance. At least with "eval", you know what you're getting. "declare -n" looks like something different, but it's not. That's where the danger lies.