help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Is it reasonable to let zero numeric value results in no


From: Greg Wooledge
Subject: Re: [Help-bash] Is it reasonable to let zero numeric value results in non zero exit status?
Date: Mon, 22 Oct 2018 09:29:40 -0400
User-agent: NeoMutt/20170113 (1.7.2)

On Sun, Oct 21, 2018 at 04:18:31PM -0500, Peng Yu wrote:
> ((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?

https://mywiki.wooledge.org/BashFAQ/105



reply via email to

[Prev in Thread] Current Thread [Next in Thread]