echo ${arr[1]}

Category: Bash Scripting

echo ${arr[1]}

Access an array element by index (zero-based)

Accesses the element at index 1 (the second element, since arrays start at 0).
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.