From: Edward Faulkner Date: 2005-09-13T12:44:17+09:00 Subject: Re: Quick question. --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 13, 2005 at 12:25:28PM +0900, Kevin Brown wrote: > I want to take a float (say 0.0) and output it with a space in front if i= t's=20 > positive, - in front if it's negative, and be able to specify how many=20 > numbers after the decimal get printed (padding with zeros). =20 printf "% .2f", 3.14159 3.14 printf "% .2f", -2 -2.00 best regards, Ed --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDJkrznhUz11p9MSARAsa6AKDQ8G7R6dasiujVn3CJx3/anZ+T/wCg4c9i sqVSVtH+VTkL0BCdjiegPEA= =dPnA -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--