[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 15:51:21 -0600 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On Wed, Nov 19, 2014 at 10:32:52PM +0100, Piotr Grzybowski wrote:
> I do understand your point. Dont you understand the need to check in
> a simple (I know, nothing works, nothing is simple ;-)) way that given
> variable has value? no matter what it is?
there:
is_defined3() {
{ declare -p -- "$1" && ! declare -fp -- "$1"; } 2>/dev/null >&2
}
works for strings, arrays and associative arrays. No need for hacks like eval,
${!var}, or a need to add a new operator to bash's test.
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, (continued)
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Greg Wooledge, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Piotr Grzybowski, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Greg Wooledge, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Piotr Grzybowski, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Greg Wooledge, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Piotr Grzybowski, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Greg Wooledge, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Piotr Grzybowski, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Chet Ramey, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Piotr Grzybowski, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?,
Eduardo A . Bustamante López <=
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Piotr Grzybowski, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Greg Wooledge, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Piotr Grzybowski, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Greg Wooledge, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Piotr Grzybowski, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Eduardo A . Bustamante López, 2014/11/19
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Stephane Chazelas, 2014/11/20
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, konsolebox, 2014/11/20
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, konsolebox, 2014/11/20
- Re: test '-v' - associative vs. normal array discrepancy - a bug ?, Greg Wooledge, 2014/11/20