Hi Eric, * Eric Blake wrote on Sun, Nov 16, 2008 at 10:01:25PM CET: > > Looks okay to me. Note, however, that bash doesn't change status to > non-zero on $(()) failure: > > $ echo $((+)) > bash: +: syntax error: operand expected (error token is "+") > $ echo $? > 0 > > so we can't really make as_func_arith a reliable way to detect ill-formed > input.
Hmm, bash 3.2.39 here does, as does zsh 4.3.6. OTOH, pdksh doesn't output an error neither change the status. Pushed, thanks for the review! Cheers, Ralf