On 9/3/14, 1:14 PM, lolilolicon wrote: > Yes, they're convenient, and make the code look somewhat more > readable, compared to equivalent `eval` or `printf -v` statements. > Functionally, they're all the same. > And they all suffer from the same issue. No matter which of those > three is used, one has to be very careful not to create name > collisions which can result in non-obvious bugs, sometimes deep in the > function call stack. One will have to invent his own variable naming > conventions to avoid such bugs; for instance, I have written a > reminder for my own script, > https://github.com/lolilolicon/FFcast/blob/master/HACKING.markdown
I think that is a consequence of mixing bash's dynamic scoping with the ksh93-derived nameref feature. It's simpler in ksh93, which uses static scoping. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/