bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: test '-v' - associative vs. normal array discrepancy - a bug ?


From: Greg Wooledge
Subject: Re: test '-v' - associative vs. normal array discrepancy - a bug ?
Date: Wed, 19 Nov 2014 15:47:50 -0500
User-agent: Mutt/1.4.2.3i

On Wed, Nov 19, 2014 at 02:41:13PM -0600, Eduardo A. Bustamante López wrote:
> People, are we forgetting that this is supposed to work in a function, by
> passing the name of a variable?

Passing the name of a variable has NEVER worked in ANY function for ANY
purpose in bash.  It only works in ksh93, which has proper namerefs.
Every time you try to do it in bash, you introduce a security hole, or
you ride the eval bus to hell.

This is precisely why I tell people not to try to write "libraries" of
reusable code in bash.  You just can't do it.  It's pointless to try.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]