9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] print(2)'s format
@ 2014-03-03  0:40 trebol
  2014-03-03  2:33 ` erik quanstrom
  0 siblings, 1 reply; 2+ messages in thread
From: trebol @ 2014-03-03  0:40 UTC (permalink / raw)
  To: 9fans

Hello, this is the little story:
I usually write scripts needing numbers padded on the left with zeros, like in '%03.0f'.  In UNIX I use printf(1), but now I'm using more and more rc scripts with P9P, and I like to use Plan9 programs to make the scripts more portable to Plan9... so I tried with seq, like '9 seq -f%03.0f $i $i' or -f%03g, getting the desired output in P9P, but discovering that in Plan9, the floating point verbs doesn't include the flag '0'.
I'm really curious about this.  Anyone knows the reason of letting out this flag (and including it in P9P)?

Regards,
trebol. 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-03  2:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-03  0:40 [9fans] print(2)'s format trebol
2014-03-03  2:33 ` erik quanstrom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).