I wouldn'tmisko_2083 wrote:I would try next:1.78Code: Select all
step=$(( 100 / cnt )).$(( (100 * 100 / cnt) % 100 ))
Remember that you would still have to add these values up. In bash? Good luck!
I find my approach much easier. Besides: The progressbar doesn't seem to care about fractions. Non-numeric characters after an integer are ignored. It doesn't matter if you echo a value of 1 or 1.99999 or even 1blabla, the bar will always show exactly 1% .