> Also, the syntax is very heavy. Was it inspired by another programming > language? The ones I'm familiar with use $1, {1}, or similar syntax, but > I've never seen %1$s :/ From printf(3): By default, the arguments are used in the order given, … One can also specify explicitly which argument is taken, at each place where an argument is required, by writing "%m$" instead of '%' and "*m$" instead of '*', where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1. Thus, printf("%*d", width, num); and printf("%2$*1$d", width, num); https://en.wikipedia.org/wiki/Printf_format_string#Parameter_field I don't know when POSIX introduced it, but it's been around for a while.