FreeBSD Bugzilla – Bug 386
*s field width specification for printf seems to loop
Last modified: 1995-05-06 18:50:00 UTC
Try this: printf "%8*s" foobarblatt
It will loop forever. The man page would tend to indicate that it,
or perhaps rather %*8s, should print the arg truncated to 8 characters.
Either way, it shouldn't loop.
Mostly pilot error; the syntax checking for the argument string has been
made more strict with version 1.2 of printf.c, so "%*8s" is no longer
considered to be a valid format string.