how to make loop from input user to inset into array inbash script linux code example
Example: how to append an array in bash
#!/bin/bash
#Making an array
array=(1 2 3)
#Appending the array
array+=(4)
#Printing the array
echo ${array[@}
# output: 1 2 3 4