bash crash processing b=b+1 after array read

2013-02-24 Thread phil colbourn
phil@rex:~$ unset a b X; declare -i a b=1; declare -ia X=(1 2 3); phil@rex:~$ unset a b X; declare -i a b=1; declare -ia X=(1 2 3); (( a=X[b] )); echo $a 2 phil@rex:~$ cd Development/pc-z80 phil@rex:~/Development/pc-z80$ chmod +x pc-crash-bash.bash phil@rex:~/Development/pc-z80$ ./pc-crash-bash.bas

declare -ia does not enfore integer type on initialisation

2014-02-04 Thread phil colbourn
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

++ causes 2 variables to increment

2016-05-15 Thread phil colbourn
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash

Re: ++ causes 2 variables to increment

2016-05-17 Thread phil colbourn
Thanks Grisha, Sorry for putting you through analysing my faulty example. Phil On 16 May 2016 at 05:58, Grisha Levit wrote: > > On Sun, May 15, 2016 at 4:42 PM, phil colbourn > wrote: > > # here, M=2 >> >> > It's not -- the value of $M here is the strin