Shell Thousand Comma en nombre

$ echo "123456789" | sed ':a;s/\B[0-9]\{3\}\>/,&/;ta'
123,456,789
Combative Crocodile