Bobby Bauer from NIH (Not Invented Here) wrote: > I've spent a nice part of the day trying to figure out how to pad a variable > with leading zeroes and still keep the decimal. The variable needs to be > formatted nnnnn.nn. Printf with a %d clobbers the decimal. Any suggestions > not using SED or AWK?
Hmmmmm... Doesn't %08.2f work? I'm not sure whether you need %+09.2f so you have a +/- as a prefix. -soup Thank you for the National Institutes of Health providing me the inspiration to doink with the TLA; I needed a good laugh. -- John R. Campbell Speaker to Machines souperb at gmail dot com MacOS X proved it was easier to make Unix user-friendly than to fix Windows "It doesn't matter how well-crafted a system is to eliminate errors; Regardless of any and all checks and balances in place, all systems will fail because, somewhere, there is meat in the loop." - me ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
