#! /bin/sed

/[^0-9]/ b 

:x
s/\(..*\)\(...\)/\1,\2/
t x

### colorized by sedsed, a SED script debugger/indenter/tokenizer/HTMLizer
### original script: http://sed.sf.net/grabbag/scripts/commify3.sed