Quote:
Originally Posted by Hko
No. Not possible in bash.
The way to dereference an array member in bash is ${a[0]}.
|
OK maybe I describe why is $[a[0]] so important
I put my scripts in some environment(I dont have permissions to change variable values in this environment). There is requirement in documentation regarding scripts to use
$[a[0]] to make them flexible(administrator changes variable values and run the scripts).
When I use $[a[0]] in my script and run it under environment IT WORKS!!!
SO HOW IT IS DONE ??
In order to test my scripts I just want to simulate the environment, set the variables as I want avoiding changing scripts($[a[0]] to ${a[0]})
I hope it's clear :-)