Hello,
I'm new here. I test these expressions's value in my script :
(in centOS 6 )
#!/bin/bash
array['test']='something'
echo "############"
echo ${array["test1"]}
echo ${array["test2"]}
echo ${array["5"]}
echo "############"
The output result is :
#################
something
something
#################
Why the value of ${array["test1"]} and ${array["test2"]} is "something" instead of empty ?
Because they are not defined just as ${array["5"]}, however the value of ${array["5"]} is empty and it's correct.
Thanks in advance for your help.