[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Why bash does not recoganize array type smartly?
From: |
Peng Yu |
Subject: |
[Help-bash] Why bash does not recoganize array type smartly? |
Date: |
Wed, 9 Mar 2016 22:16:16 -0600 |
Hi, Bash requires one explicitly declare associative array before it
can be used. It seems that this requirement may be too strictly given
no other types need to be declared first before being used.
Is there any rationale why bash is defined in this way. Wouldn't it
better to allow users define associative array just by using something
like `x=([a]=1 [b]=2)` without having to declare it?
x=([a]=1 [b]=2)
declare -A x
./main.sh: line 6: declare: x: cannot convert indexed to associative array
--
Regards,
Peng
- [Help-bash] Why bash does not recoganize array type smartly?,
Peng Yu <=
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Chris F.A. Johnson, 2016/03/10
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Chet Ramey, 2016/03/10
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Dan Douglas, 2016/03/15
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Stephane Chazelas, 2016/03/15
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Dan Douglas, 2016/03/15
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Greg Wooledge, 2016/03/16
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Dan Douglas, 2016/03/16
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Stephane Chazelas, 2016/03/16
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Chet Ramey, 2016/03/17
- Re: [Help-bash] Why bash does not recoganize array type smartly?, Stephane Chazelas, 2016/03/16