Every instance I've found of printf(1)
(that is, the command-line version; as opposed to printf(3)
, the C library) repeats its format-string to consume more when presented with too many arguments, allowing for constructions such as
printf '%s\n' "${headers[@]}" "" "${body}" > http_client_socket
However, is this platform-specific? If so, which platforms does it differ from this on?
Additionally (and regardless of the answer to the previous question), is it in the spec, or is it an undefined behavior?