On Mon, Aug 26, 2013 at 9:36 PM, David Lehmann <
david.lehm...@alumni.rutgers.edu> wrote:

> My issue is that the resulting behavior in Exercise 1 does not make sense.
>
> The resulting value of i should have no bearing on the exit code.  If the
> addition succeeded, the expression should return 0 (success).  If i was not
> an integer (e.g. i=hello), then I expect (( i++ )) to return a non-zero
> error code.
>
> ...IMHO, of course.
>
>
Then what do you expect to happen for i=0; if ((i)); then echo "hi"; fi ?

Making the value of i not affect the exit status would make (( practically
worthless for most things

Reply via email to