On Sunday, December 14, 2014 09:44:16 PM Stephane Chazelas wrote: > but: > > x='($(uname>&2))' bash -c 'f() { a[0]=x; declare a=$x; }; f' > > is not, because when in a function, declare ignores variables by > the same name that have not been declared in that same scope > (even if they have been *set* in that context) > > So it's more unlikely to be a problem than I thought it would be > as "declare" is mostly used in functions.
Indeed I was just about to point this out. It's a rare scenario at least in my code to either declare something twice in the same scope or rely upon a global being in a particular state. -- Dan Douglas