#! /bin/sed

:x
s/\([0-9]\+\)\([0-9]\{3\}\)/\1,\2/
t x

### colorized by sedsed, a debugger and code formatter for sed scripts
### original script: http://sed.sf.net/grabbag/scripts/commify2.sed