Re: Shell case statements

2011-05-20 Thread Chet Ramey
On 5/20/11 12:10 PM, Eric Blake wrote: > On 05/20/2011 09:33 AM, Chet Ramey wrote: >>> Well, that's rather all over the place, but yes, it does seem like bash >>> was the buggiest of the lot, compared to other shells. Interactively, I >>> tested: >>> >>> readonly x=1 >>> case 1 in $((x++)) ) echo

Re: Shell case statements

2011-05-20 Thread Eric Blake
On 05/20/2011 09:33 AM, Chet Ramey wrote: >> Well, that's rather all over the place, but yes, it does seem like bash >> was the buggiest of the lot, compared to other shells. Interactively, I >> tested: >> >> readonly x=1 >> case 1 in $((x++)) ) echo hi1 ;; *) echo hi2; esac >> echo $x.$? >> >> ba

Re: Shell case statements

2011-05-20 Thread Chet Ramey
On 5/19/11 6:09 PM, Eric Blake wrote: > [adding bug-bash] > > On 05/16/2011 07:23 PM, Wayne Pollock wrote: >> (While cleaning up the standard for case statement, consider that it is >> currently >> unspecified what should happen if an error occurs during the expansion of the >> patterns; as expan

Re: Shell case statements

2011-05-19 Thread Eric Blake
[adding bug-bash] On 05/16/2011 07:23 PM, Wayne Pollock wrote: > (While cleaning up the standard for case statement, consider that it is > currently > unspecified what should happen if an error occurs during the expansion of the > patterns; as expansions may have side-effects, when an error occur