Greg Wooledge wrote:
On Fri, Aug 12, 2011 at 12:19:59PM -0700, Linda Walsh wrote:
Under -e, it would fail on the 'let' statement
This is one of the cases I mention on http://mywiki.wooledge.org/BashFAQ/105
AND there, you explain WHY this needs to be fixed.
Your final recomm
On Fri, Aug 12, 2011 at 12:19:59PM -0700, Linda Walsh wrote:
> Under -e, it would fail on the 'let' statement
This is one of the cases I mention on http://mywiki.wooledge.org/BashFAQ/105
> "-e" -- in a WELL DESIGNED PROG***, where errors are caught,
> shouldn't cause a otherwise working progr
Greg Wooledge wrote:
On Fri, Aug 12, 2011 at 08:18:42AM -0700, Linda Walsh wrote:
> If I write a==0 on the bash command line, it will generate an error.
>
> a=0 does not. 'Bash' knows the difference between an assignment and
> a equality test in math.
imadev:~$ ((a==0))
imadev:~$ ((a=0))
On Fri, Aug 12, 2011 at 08:18:42AM -0700, Linda Walsh wrote:
> If I write a==0 on the bash command line, it will generate an error.
>
> a=0 does not. 'Bash' knows the difference between an assignment and a
> equality test in math.
imadev:~$ ((a==0))
imadev:~$ ((a=0))
imadev:~$ a==0
imadev:
Greg Wooledge wrote:
On Thu, Aug 11, 2011 at 11:56:10PM -0700, Linda Walsh wrote:
**Exception**
declare -i a
a=0
--
As a is declared to be an integer, it has the results evaluated
at assignment time. a=0 is an integer expression that doesn't set
$?=1
Neither should:
((a=0))
a=0 is an
On 08/12/2011 06:51 AM, Greg Wooledge wrote:
On Thu, Aug 11, 2011 at 11:56:10PM -0700, Linda Walsh wrote:
**Exception**
declare -i a
a=0
--
As a is declared to be an integer, it has the results evaluated
at assignment time. a=0 is an integer expression that doesn't set
$?=1
Neither sho
On Thu, Aug 11, 2011 at 11:56:10PM -0700, Linda Walsh wrote:
> **Exception**
> declare -i a
> a=0
> --
> As a is declared to be an integer, it has the results evaluated
> at assignment time. a=0 is an integer expression that doesn't set
> $?=1
> Neither should:
> ((a=0))
a=0 is an assignme