4.2 error: processing command substitution within arithmetic operation

2011-06-24 Thread Rui Santos
10 and was able to build a patch that it seems to make it work. So to all you Bash guru's, can this patch be applied with no extra consequences ? Thanks for all your help, -- Regards, Rui Santos diff -ruN bash-4.2-10.ori/subst.c bash-4.2-10.new/subst.c --- bash-4.2-10.ori/subst.c 2

Re: 4.2 error: processing command substitution within arithmetic operation

2011-06-28 Thread Rui Santos
On 24-06-2011 21:01, Greg Wooledge wrote: On Fri, Jun 24, 2011 at 06:18:08PM +0100, Rui Santos wrote: Try this script: #!/bin/bash declare -ax array array[$(( $( echo -n 1001 ) - 1001 ))]=1 this will issue an error: line 6: 1001: command not found imadev:~$ unset array imadev:~$ array

Re: 4.2 error: processing command substitution within arithmetic operation

2011-06-28 Thread Rui Santos
On 25-06-2011 01:50, Chet Ramey wrote: On 6/24/11 1:18 PM, Rui Santos wrote: Try this script: #!/bin/bash declare -ax array array[$(( $( echo -n 1001 ) - 1001 ))]=1 this will issue an error: line 6: 1001: command not found If however the script is turned into: #!/bin/bash declare -ax