≡ Menu

LANG

Unix / Linux: Bash Number Currency Formatting Thousands Grouping Separator

I have a number stored in a shell variable called x=”240570.578″. I would like to print $x as 2,40,570.57. How do I replace the number with their currency format under bash shell scripts?
[click to continue…]