quoting the values in second field

view full story

http://www.unix.com – Hi, I have got a file comp_data containing the below data : Code: 38232836|9302392|49 39203827|8203203,3933203|52 72832788|567,3245,2434324|100 This file can have many rows like shown above. I want the values separated by "," in second column(taking "|" as delimiter) to be in quotes. These values can be of any length Output should be: Code: 38232836|'9302392'|49 39203827|'8203203','3933203'|52 72832788|'567','3245','2434324'|100 The comma separated second column can have any number of values. I want all values to be in quotes. Please help me. (HowTos)