[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Is it reasonable to let zero numeric value results in non ze
From: |
Peng Yu |
Subject: |
[Help-bash] Is it reasonable to let zero numeric value results in non zero exit status? |
Date: |
Sun, 21 Oct 2018 16:18:31 -0500 |
Hi,
I see the following.
((x=0))
$ echo $?
1
I am not sure whether it is a good idea to return non zero exit status
when a numeric variable is zero, as this can cause problems when `set
-e` is used. Is there is a strong justification why this behavior is
reasonable?
--
Regards,
Peng