anyone know a shortway to parse numbers with commas in bash?
ex: 1000
becomes 1,000
and so on
this is what im using, it works, but wondering if theirs anything shorter
ex: 1000
becomes 1,000
and so on
this is what im using, it works, but wondering if theirs anything shorter
Code:
echo 10000 | sed -r ':L;s=\b([0-9]+)([0-9]{3})\b=\1,\2=g;t L'


Comment