sprintf("% #6f", "2")results in a SyntaxError: [sprintf] unexpected placeholder
From man printf:
Each format specification is introduced by the percent character ("%''). The remainder of the format specification includes, in the following order:
Zero or more of the following flags:
# A `#' character specifying that the value should be printed in an "alternate
form". For c, d, and s, formats, this option has no effect. For the o formats the
precision of the number is increased to force the first character of the output string
to a zero. For the x (X) format, a non-zero result has the string 0x (0X) prepended
to it. For e, E, f, g, and G, formats, the result will always contain a decimal point,
even if no digits follow the point (normally, a decimal point only appears in the results
of those formats if a digit follows the decimal point). For g and G formats, trailing
zeros are not removed from the result as they would otherwise be;
sprintf("% #6f", "2")
results in aSyntaxError: [sprintf] unexpected placeholder
From
man printf
: