[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
declare a=( {1..10} )
From: |
agriffis |
Subject: |
declare a=( {1..10} ) |
Date: |
Thu, 9 Jul 2009 09:16:05 -0500 |
Configuration Information [Automatically generated, do not change]:
Machine: i486
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2 -Wall
uname output: Linux oliva 2.6.28-1-amd64 #1 SMP Mon Feb 23 04:56:40 UTC 2009
i686 GNU/Linux
Machine Type: i486-pc-linux-gnu
Bash Version: 4.0
Patch Level: 24
Release Status: release
Description:
Array assignment with declare produces unexpected results.
Repeat-By:
$ foo() {
declare a=( {1..10} )
declare b; b=( {1..10} )
set | grep '^[ab]='
}
$ foo
a='(10)'
b=([0]="1" [1]="2" [2]="3" [3]="4" [4]="5" [5]="6" [6]="7" [7]="8"
[8]="9" [9]="10")
- declare a=( {1..10} ),
agriffis <=