• + 2 comments

    I believe you have a small mistake in the problem statement. Bash arrays are indexed starting from zero, not 1.

    $ a=(a b c)
    `$ echo $`{a[0]}
    a
    `$ echo $`{a[1]}
    b