Hi folks,
usually I create certain arrays using the following command:
set -A Array_Name $(cat /list.lst)
Now I'd like to change the command so that the array name is taken from a variable.
So far I e.g. tried the following:
Array_Name=$(echo "Test")
set -A $Array_Name $(cat /list.lst)
Problem is when i try to see what's in my array using
echo ${Array_Name[*]}
The output looks like this:
Test
...
What's wrong here ?
Regards
Thomas
usually I create certain arrays using the following command:
set -A Array_Name $(cat /list.lst)
Now I'd like to change the command so that the array name is taken from a variable.
So far I e.g. tried the following:
Array_Name=$(echo "Test")
set -A $Array_Name $(cat /list.lst)
Problem is when i try to see what's in my array using
echo ${Array_Name[*]}
The output looks like this:
Test
...
What's wrong here ?
Regards
Thomas