Split Records

view story

http://www.unix.com – I have a flat file with 2 columns Code: Id,loc 1,nj:ny:pa 2,pa 3,ca:tx:fl:nj Second colum data is seperated by semi colon and can i have many locations for one id Output i need is Code: 1,nj 1,ny 1,pa 1,pa 3,ca 3,tx 3,fl 3,nj I need to split the record in to multiple records. please help me how to proceed Moderator's Comments: Please use code tags next time for your code and data. (HowTos)