bash adding to array 1

bash adding to array


#Making an array
array=(1 2 3)

#Appending the array

#Printing the array
echo ${array[@]}

Here is what the above code is Doing:
1. We are creating an array with three elements.
2. We are appending the array with another element.
3. We are printing the array.

Similar Posts