How to format line counts after sort and uniq add thousand separator
Sample Input:
1000 A
3000 B
Output:
1,000 A
3,000 B
How to format line counts after sort and uniq add thousand separator
Sample Input:
1000 A
3000 B
Output:
1,000 A
3,000 B
Using numfmt from GNU Coreutils:
printf '1000 A\n3000 B\n' | numfmt --field=1 --grouping
1,000 A
3,000 B
The result that you get may depend on your locale.