3 # zprintf - function that calls gawk to do printf for those systems that
4 # don't have a printf executable
6 # The format and arguments can have trailing commas, just like gawk
9 # zprintf 'Eat %x %x and suck %x!\n' 57005 48879 64206
15 echo "zprintf: usage: zprintf format [args ...]" >&2
23 args
="$args,\"${a%,}\""
26 gawk
"BEGIN { printf \"$fmt\" $args }"