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

Re: Short list of issues with various expansions and IFS

2013-02-24 Thread Thorsten Glaser
Chet Ramey dixit: >> 2. IFS side-effects don't take effect during expansion. > >Yeah, this is a tough one. If you want side effects of assignments to IFS >to affect subsequent expansions, you have to have a way to ensure that the I think changing IFS during expansion is just asking for trouble.

Re: More fun with IFS

2013-02-24 Thread Thorsten Glaser
Dan Douglas dixit: >Zsh and pdkshes produce: > >one:::two:three:::four > >For all of the above, which I think is wrong for the last 4. ksh93 produces: Why is it incorrect? The mksh manpage documents $@ behaving like $*: @ Same as $*, unless it is used inside double quotes, in which c