NightDev Community Forums

3 digit counter

$(count) will add 1 each time the command is called.

What I’d like is a counter that looks like this:
001, 002, 003, 004 …
…019, 020, 021, 022, 023 …

I hope I’m making sense. I anticipate reaching hundreds but I’d like front zeros to be present for single digit numbers and double digit numbers also. How can I do this?

@sirphist

$(eval `$(count)`.padStart(3,`0`))
1 Like

Thanks again @RokettoJanpu! You’re a champion!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.