in reply to printf syntax
printf "%*s", 10, $some_string; [download]
That will print your string, right justified and padded to 10 spaces. Use -10 if you want left justification.