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
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
*]}; Z=( D E F ); echo ${Z[*]}
Outputs
A B C
0 0 0
Should output:
0 0 0
0 0 0
Phil
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
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='ba
t me know if you
would find the code useful. Searching has found some other wrappers
(e.g. 3 at packages.debian.org) that solve the slightly different and
more complex problem of wrapping an entire program that doesn't use
readline so that it does use it for all input. That's not what I need
in this case.
Thanks for any advice.
Phil.