This question already has an answer here:
- Add thousands separator in a number 12 answers
I am using the following command on Terminal in MacBook.
printf "The number is %'d\n" 123456
I expect the output:
The number is 123,456.
But I am getting:
The number is 123456.
Please point out my mistake.