How do I read an array in Linux?

How do I read an array in Linux?
Answer
You can easily count the total number of elements of any bash array by using “#” and “*” symbol which is shown in the first part of the following example. For loop is commonly used to iterate the values of any array. You can also read array values and array indexes separately by using
for loops.
 

Tìm kiếm

Back
Top