我已经找到了一个解决方案,这可以通过:
$ Aref=A$J $ echo ${!Aref} building $ Aref=A$J[1] $ echo ${!Aref} blocks $ Aref=A$J[@] $ echo "${!Aref}" building blocks