Basics
Array
Declare an array
We can declare array in bash script using,
declare -a prefixArrayNow, 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 prefixArrayLast updated
Was this helpful?