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
Eric Blake wrote:
On 08/10/2011 10:39 PM, Linda Walsh wrote:
"It sounded to me like $(( )) would be translated into "$( () )",
turning off arithmetic expansion. Did I read that ___incorrectly__?
Yes, you read it incorrectly.
---
*thankyou*
POSIX is saying that _if_ you want to
On 08/10/2011 10:39 PM, Linda Walsh wrote:
Chet Ramey wrote:
> If not, then wouldn't
> $((( ))) be turned into $( (( )) ), meaning the arith returns a
> status,
> and not the calculation. (I've tested this, and this is the case.
Then I said:
"It sounded to me like $(( )) would be translated in
Chet Ramey wrote:
> If not, then wouldn't
> $((( ))) be turned into $( (( )) ), meaning the arith returns a
> status,
> and not the calculation. (I've tested this, and this is the case.
This is demonstrably false.
---
No... you've only proven that you should have a bit of 'compassion'
for
10 matches
Mail list logo