Kunhi
0
Q:

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
0

New to Communities?

Join the community