Re: Problems when RANDOM without $ is used as an array index

2010-01-12 Thread Stephane CHAZELAS
2010-01-11, 17:42(-05), Chet Ramey: >> > Think of it as >> > >> > x = $(( RANDOM%6+1 + RANDOM%6+1 )) >> > y = dice[x] >> > dice[RANDOM%6+1 + RANDOM%6+1] = y + 1 >> > return y >> [...] >> >> I would still consider that a bug. > > OK. But everyone does it the same way. Except for pdksh, mksh, posh

Re: [bash-4.0 executes command without newline]

2010-01-12 Thread Arindam Sarkar - Sun Microsystems
Hi Chet, My apologies for the delay in replying to your email. Chet Ramey wrote: On 12/16/09 7:59 AM, Arindam Sarkar - Sun Microsystems wrote: Configuration Information [Automatically generated, do not change]: Machine: sparc OS: solaris2.11 Compiler: /ws/onnv-tools/SUNWspro/SS12/bin/c99 C

Brokenness in bash-3.2 Makefile

2010-01-12 Thread Philip A. Prindeville
I'm trying to cross-build bash-3.2 with certain cross-compilation flags (like LDFLAGS="--sysroot=$(STAGING_DIR)/usr") but since LDFLAGS_FOR_BUILD is set to $(LDFLAGS), this isn't working. It would be nice to be able to set the two orthogonally. Anyone have a patch I could test? Thanks, -Phili

Re: Brokenness in bash-3.2 Makefile

2010-01-12 Thread Chet Ramey
> I'm trying to cross-build bash-3.2 with certain cross-compilation flags (like > LDFLAGS="--sysroot=$(STAGING_DIR)/usr") but since LDFLAGS_FOR_BUILD is set to > $(LDFLAGS), this isn't working. > > It would be nice to be able to set the two orthogonally. Why not just specify the appropriate val

Re: Brokenness in bash-3.2 Makefile

2010-01-12 Thread Mike Frysinger
On Monday 11 January 2010 22:31:15 Philip A. Prindeville wrote: > I'm trying to cross-build bash-3.2 with certain cross-compilation flags > (like LDFLAGS="--sysroot=$(STAGING_DIR)/usr") but since LDFLAGS_FOR_BUILD > is set to $(LDFLAGS), this isn't working. > > It would be nice to be able to set

Re: Problems when RANDOM without $ is used as an array index

2010-01-12 Thread Chet Ramey
On 1/12/10 5:16 AM, Stephane CHAZELAS wrote: > 2010-01-11, 17:42(-05), Chet Ramey: Think of it as x = $(( RANDOM%6+1 + RANDOM%6+1 )) y = dice[x] dice[RANDOM%6+1 + RANDOM%6+1] = y + 1 return y >>> [...] >>> >>> I would still consider that a bug. >> >> OK. But everyone