I want to write a Shell (AWK, Sed also fine) program to take as a input a SINGLE line of text.
Which will have arbitrarily spread integer strings in it. e.g
"12884 and 111933 are two numbers and 323232 is also a number"
I want the output to be
"12,884 and 1,11,933 are two numbers and 2,23,232 is also a number"
If this was PHP a simple preg_replace_callback would have served the purpose but I want this to be in shell. :/
Any pointers would of great help.