Usually, an assignment preceding a command that would create a
variable with an invalid name is rejected and treated like a command
name:

$ 1=X :
bash: 1=X: command not found

But when the variable name looks (sort of) like an array subscript
assignment, it is accepted and an oddly named variable is created:

$ f() { declare -p ${!var*}; }; var[0]=X var[@]=Y f
declare -x var[0]="X"
declare -x var[@]="Y"

Reply via email to