On Fri, Jul 30, 2010 at 09:49:22PM +0200, Stefano Lattarini wrote:
> But then, maybe an exit status of `2' instead of `1' in case of errors
> in ((...)) would be helpful -- currently the exit status is still `1'
> also if a real error is present:
> 
>   $ ((1+)); echo \$?=$?
>   bash: ((: 1+: syntax error: operand expected (error token is "+")
>   $?=1

Most syntax errors cause the shell to abort right then and there, when in
non-interactive mode.  Syntax errors inside an arithmetic context don't,
which is already weird.  If I were going to ask for a change, it would
be to make them crash the script instead of letting bash continue.

Reply via email to