Bash Arrays
Bash Arrays
Declare a variable with ARRAY=(one two three) and reference it using echo ${ARRAY[*]} or echo ${ARRAY[2]} for a single element.
Note that brackets are not required in for statements: for i in 1 2 3; do echo $i; done
Declare a variable with ARRAY=(one two three) and reference it using echo ${ARRAY[*]} or echo ${ARRAY[2]} for a single element.
Note that brackets are not required in for statements: for i in 1 2 3; do echo $i; done