Peng Yu
2018-06-09 23:03:31 UTC
I see @ and * are not allowed. Is there anything else that is not allowed?
$ cat ./main.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
set -v
declare -A x=([@]=1)
declare -A x=([*]=1)
declare -A x=([*a]=1)
$ ./main.sh
declare -A x=([@]=1)
./main.sh: line 5: [@]=1: invalid associative array key
declare -A x=([*]=1)
./main.sh: line 6: [*]=1: invalid associative array key
declare -A x=([*a]=1)
$ cat ./main.sh
#!/usr/bin/env bash
# vim: set noexpandtab tabstop=2:
set -v
declare -A x=([@]=1)
declare -A x=([*]=1)
declare -A x=([*a]=1)
$ ./main.sh
declare -A x=([@]=1)
./main.sh: line 5: [@]=1: invalid associative array key
declare -A x=([*]=1)
./main.sh: line 6: [*]=1: invalid associative array key
declare -A x=([*a]=1)
--
Regards,
Peng
Regards,
Peng