This thread discusses many alternatives for that: How to repeat the format in @printf? - #2 by heliosdrm