Thread
:
shortway to parse numbers with commas in bash?
View Single Post
11-02-2010, 06:39 AM
fris
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,359
shortway to parse numbers with commas in bash?
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
Code:
echo 10000 | sed -r ':L;s=\b([0-9]+)([0-9]{3})\b=\1,\2=g;t L'
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.
WP Stuff
fris
View Public Profile
Find More Posts by fris