In shell scripting, I have a loop with an if condition inside a for loop.
for i in val1 val2
do
if ((condition)) then
printf ...
fi
done
This loop returns me correct output which is a list of numbers. However, I want to store these numbers in an array to use inside another loop. How do I do this?
I want to know how to store the values returned by printf statement in an array.