How can I store numbers from two loops into one array and take average of those numbers?
#!/bin/bash
START_se1=55761
END_se1=55770
START_set2=55900
END_set2=55917
#set1
for ID in {$START_set1..$END_set1}
do
myarr1=($(echo ${ID}))
done
#set2
for ID in {$START_set2..$END_set2}
do
myarr2=($(echo ${ID}))
done
app=( "${myarr1[@]}" "${myarr2[@]}" )
echo $app
This code gives only last ID in myarr1 which is 55770
Thanks