Hi Folks,
I was wondering ... ;-)
I know I can create an Array using
So ... Is it possible to do the same using Variables like that:
Using the code from above I Keep getting the error message "This is not an identifier.". And another Problem would be that I have no idea how to reference elements within that Array later on ...
Like this:
or
Regards,
Thomas
I was wondering ... ;-)
I know I can create an Array using
Code:
set -A myarray $(cat filename.txt)
So ... Is it possible to do the same using Variables like that:
Code:
for i in sys1 sys2 sys3;
do
set -A AR$i $(cat /tmp/$i.txt)
done
Using the code from above I Keep getting the error message "This is not an identifier.". And another Problem would be that I have no idea how to reference elements within that Array later on ...
Like this:
Code:
echo ${AR$i[0]}
or
Code:
echo ${AR\$i[0]}
Regards,
Thomas