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: Eduardo A . Bustamante López
Subject: Re: test '-v' - associative vs. normal array discrepancy - a bug ?
Date: Wed, 19 Nov 2014 17:35:30 -0600
User-agent: Mutt/1.5.23 (2014-03-12)

> So far, so good.  But....
> 
> imadev:~$ foo() { echo foo; }
> imadev:~$ foo=bar
> imadev:~$ is_defined3 foo ; echo $?
> 1

Ouch! Last try:

is_defined4() {
        declare -p -- "$1" 2>/dev/null >&2
}

But I agree with you, the shell is tricky.



reply via email to

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