I’ve already found a resolution, this can be done by:
$ Aref=A$J
$ echo ${!Aref}
building
$ Aref=A$J[1]
$ echo ${!Aref}
blocks
$ Aref=A$J[@]
$ echo "${!Aref}"
building blocks
More Related Contents:
- How to split a string into an array in Bash?
- Reading output of a command into an array in Bash
- How to sort an array in Bash
- Passing arrays as parameters in bash
- Iterate over two arrays simultaneously in bash
- Compare/Difference of two arrays in Bash
- Read lines from a file into a Bash array [duplicate]
- Add new element to existing JSON array with jq
- Remove an element from a Bash array
- How do I assign the output of a command into an array?
- How to slice an array in Bash
- How to pass an associative array as argument to a function in Bash?
- How to pass array as an argument to a function in Bash
- Bash array with spaces in elements
- Exporting an array in bash script
- Print array elements on separate lines in Bash?
- Arrays in unix shell?
- A confusion about ${array[*]} versus ${array[@]} in the context of a bash completion
- Read tab-separated file line into array
- I am getting error “array.sh: 3: array.sh: Syntax error: “(” unexpected”
- Convert multiline string to array [duplicate]
- Assign to a bash array variable indirectly, by dynamically constructed variable name
- Assigning an Array Parsed With jq to Bash Script Array
- How can I join elements of a Bash array into a delimited string?
- Easiest way to check for an index or a key in an array?
- How to keep associative array order?
- How to find the length of an array in shell?
- How do I assign ls to an array in Linux Bash?
- Check if an element is present in a Bash array [duplicate]
- How to copy an array in Bash?