[NBLUG/talk] Arrays in Bash

Barry Stump barry.stump at gmail.com
Fri May 13 11:49:32 PDT 2011


You can use indirect references (a feature of bash 2 and up) with
scalar variables, but not arrays.
Example:

VAR1=FOO
VAR2=VAR1

# prints "FOO"
echo ${!VAR2}



-Barry



More information about the talk mailing list