A program I use takes input from a text file and expects strings dealing with currency to be formatted as XXXX.XX
I would like to be able to just enter the relevant parts of the number and have my script add the leading zeros and/or trailing dot and zeros as necessary. For example, to enter 1.1 and have it formatted 0001.10, enter 32 and have it formatted 0032.00, enter .99 and have it formatted 0000.99, etc.
Doing it purely with bash would be nice, but calling something else like sed as well would be fine too.