title: How to convert a number that could ve variable from 0 to 10 digits into an amount format Unix KSH
body: <p>I'm trying to convert a number that could be variable from 0 to 10 digits into an amount format, I already have a solution for this (while loop all the digits) but someone told me that is much easier using printf command, an example of the format is:</p>
  
  <pre><code>AMOUNT_WITHOUT_FORMAT        AMOUNT_WITH_FORMAT
  6627492                      66,274.92
  772220124                    7,722,201.24
  120198                       1,201.98
  </code></pre>
  
  <p>How can I format these values like that?</p>
  
  <p>As I said, I already have a solution but I want to improve it with less code lines.</p>
  
  <p>thank you all</p>