Use sed command to replace , appearing between numbers

Posted by Saurabh on Super User See other posts from Super User or by Saurabh
Published on 2010-12-20T13:19:40Z Indexed on 2010/12/21 7:55 UTC
Read the original article Hit count: 331

Filed under:
|
|
|

I have a CSV file where data are in the following format

|001|,|abc,def|,123456,789,|aaa|,|bbb|,444,555,666

I want to replace only those "," that appears between numbers with some other character like say SOH or $ or *

other "," appearing in the line should not get replaced i.e. to say I wish to have following output

|001|,|abc,def|,123456*789,|aaa|,|bbb|,444*555*666

Can someone please help me with sed command pattern to get the above desired output

© Super User or respective owner

Related posts about unix

Related posts about shell