How do you create an array in Linux?

How do you create an array in Linux?
Answer
Create an array
  1. Create indexed or associative arrays by using declare. We can explicitly create an array by using the declare command: $ declare -a my_array. …
  2. Create indexed arrays on the fly. …
  3. Print the values of an array. …
  4. Print the keys of an array. …
  5. Getting the size of an array. …
  6. Deleting an element from the array.
 

Tìm kiếm

Back
Top