Arrays are a very important component for storing a collection of data as separate entities using indexes.
Bash supports regular arrays as well as associative arrays. Regular arrays are arrays which can use only integers as its array index. But associative arrays are arrays which can take a string as its array index.
Associative arrays are very useful in many types of manipulations. Associative array support came with version 4.0 of Bash. Therefore, older versions of Bash will not support associative arrays.
An array can be defined in many ways. Define an array using a list of values in a line, as follows:
array_var=(1 2 3 4 5 6) #Values will be stored in consecutive locations starting from ...