Bash-4.2 distribution sources and documentation
This commit is contained in:
parent
30d188c293
commit
495aee441b
341 changed files with 108751 additions and 36060 deletions
27
tests/assoc5.sub
Normal file
27
tests/assoc5.sub
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
declare -A myarray
|
||||
|
||||
# this needs fixes to skipsubscript
|
||||
myarray["a]a"]="abc"
|
||||
|
||||
echo ${myarray["a]a"]}
|
||||
|
||||
myarray[$(echo ])]=def
|
||||
|
||||
echo ${myarray[']']}
|
||||
echo ${myarray[\]]}
|
||||
|
||||
declare myarray["foo[bar"]=bleh
|
||||
myarray["foo"]=bleh
|
||||
|
||||
echo "${myarray[@]}"
|
||||
|
||||
bar='a]=test1;#a'
|
||||
myarray[$bar]=123
|
||||
|
||||
set | grep ^myarray=
|
||||
echo ${myarray[a]}
|
||||
|
||||
echo "${myarray['a]=test1;#a']}"
|
||||
myarray['a]=test2;#a']="def"
|
||||
|
||||
set | grep ^myarray=
|
||||
Loading…
Add table
Add a link
Reference in a new issue