On Fri, 2005-09-23 at 10:57 +0200, Ralf S. Engelschall wrote:
> On Fri, Sep 23, 2005, Stuart Shelton wrote:
> > If I run 'A=$(( 3 + 4 )); echo $A' on different shells, I get the
> > following results:
> 
> For me it looks that it already incorrectly _parses_ (and not just
> evaluates) the $((..)) construct. The problem you can just hunt down
> by using a debugger or at least instrumenting Bash with many debugging
> printf's.

If all (three) of the instances of "$((.*))" are replaced in etc/rc,
then the script does now work, e.g.:

Line 135: "i=$(( $i + 1 )) " -> "(( i++ ))"
Line 448: "verbose_pos=$(( $verbose_pos + ${#output} ))" ->
"(( verbose_pos += ${#output} ))"
Line 455: As above

... then this fixes things for me.

It still looks as if bash is broken on IRIX, but this seems to be
slightly neater code that works.  Perhaps it's worth changing the rc
script for the next release, since it shouldn't break on other platforms
but it does allow IRIX to function correctly?

Just a thought...

Cheers,

        Stuart

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   openpkg-dev@openpkg.org

Reply via email to