sed:numbering:add_commas_to_numeric_strings
This is an old revision of the document!
SED - Numbering - Add commas to numeric strings
Change “1234567” to “1,234,567”.
gsed ':a;s/\B[0-9]\{3\}\>/,&/;ta' # GNU sed sed -e :a -e 's/\(.*[0-9]\)\([0-9]\{3\}\)/\1,\2/;ta' # other seds
sed/numbering/add_commas_to_numeric_strings.1597580789.txt.gz · Last modified: 2020/08/16 12:26 by 192.168.1.1