Ok, it’s the n-th time I search how to pad numbers in bash.
I’ll take a note here:

i=5
printf "%03d\n" \$i
005


Something similar in Python and Go:

t = "test-"
t.ljust(10, '0') # rjust for right padding

'test-00000'

// LeftPad returns the string padded filling remaining left spaces to length with pad.
import "log"
import "strings"

var repeat int

It is also possible to do this with fmt but you still need to compute the number of char if you want to maintain the total number of printed char.