Basics
Array
Declare an array
We can declare array in bash script using,
declare -a prefixArray
Now, we can put data on array at any index. Array is 0 indexed.
prefixArray[INDEX]=VALUE
prefixArray[0]="this is first element"
After using array clear the memory using unset
,
unset prefixArray
Last updated
Was this helpful?