The follow bash script works fine for for high counting number ranges from 1..1000
By high counting number ranges, bigger than 1..1000000, it needs some time to start. In general, it's working fine.
for i in {1..10}; do
printf '\r%2d' $i
sleep 1
done
printf '\n'
For counting down number ranges from 99..1 it's working fine.
For counting down number ranges which start higher than 99, p.e. 100..1 the output prints a digit with a zero too much. How can you avoid that?
Unfortunately I don't have enough knowledge to fix this myself. Best would be a fix, where the exact number of digits of the numbers does not matter.
– Alfred.37 May 19 '20 at 17:49