On 12.08.2011 01:05, Chet Ramey wrote:
> It's eval. Try the attached patch.
Works like a charm. Thanks a lot!
Martin
signature.asc
Description: OpenPGP digital signature
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
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
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 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 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 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
In my bash package:
rpm -qi bash
Name : bash Relocations: (not relocatable)
Version : 4.1 Vendor: openSUSE
Release : 20.25.1 Build Date: Sun 27 Feb 2011 05:51:30 AM PST
Install Date: Sun 22 May 2011 01:28:49 PM PDT Build Host: build31
...
in the 'bash' manpage, under the 'set' option, under
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