Shell scripting: append element to array








declare -a array1=()
a+=('foo')
a+=('bar')

for elem in "${array1[@]}"
do
    echo $elem
done



No comments:

Post a Comment