I have Array of 3 elements and I retrieve these elements in for loop and perform some command on it.
and I want to store the output in single array. How can I do that?
Array1 contains
[ /home/users/abc /home/users/pqr /home/users/xyz]
I want to perform
declare -a product_array
IFS=":"
read -ra ADDR <<< "$Array1"
for i in "${ADDR[@]}"; do
DIR=${i}/aaa/deployment/traces/
product_array=( $(product_array) $(ls $DIR) )
done
I want to store everything in product_array.