Re: Brace Expansion doesn't handle whitespace gracefully

2016-08-30 Thread Chet Ramey
On 8/30/16 2:43 PM, Wesley Hirsch wrote: > My guess is that is caused by the fact that initial > wordsplitting separates > the components before brace expansion can get to them, but this is > unintuitive, and either the behavior should change or the > documentation >

Brace Expansion doesn't handle whitespace gracefully

2016-08-30 Thread Wesley Hirsch
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE

Re: Single quote character not handled well in associative array index

2016-08-30 Thread Greg Wooledge
On Mon, Aug 29, 2016 at 11:28:47PM -0400, Wesley Hirsch wrote: > ((++a[\$b])) These three also work: (('++a[$b]')) (('++a["$b"]')) : $((++a["$b"])) But yes, this does seem like a bug.

Re: Single quote character not handled well in associative array index

2016-08-30 Thread Wesley Hirsch
On Mon, Aug 29, 2016 at 5:57 PM, Jarno Suni wrote: > declare -A a > b="80's" > ((++a[$b])) > ((++a["$b"])) > [[ $((++a[$b])) ]] || true > [[ $((++a["$b"])) ]] || true # this finally works and makes the variable > =1 > echo ${a["$b"]} > echo ${a[$b]} > ((++a[\$b])) It's non-intuitive certainly,