I´m facing a problem while doing one exercise. I have the next piece of code and the desired result is to give me all these numbers as absolute values (not negatives), but in the last element of the loop for (i=64) is resulting me in a negative one. I am doing something wrong or misunderstanding the loop behaviour?
Thank you very much!
declare -i sheet=1
for i in {2..64}
do
echo "$sheet" "before"
echo "$((sheet*2))" "after"
sheet=$((sheet*2))
done