The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-16-2009
r_t_1601 r_t_1601 is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 25
Removing commas within semicolon in a flat file

i am recieving a flat file ( comma seperated ) with comma in between double quotes in any of the source fields . i need to remove the comma in double quotes and process the file thereafter

fields in file
=========
col1,col2,col3,col4

input can be any of the followng
=======================
rohan,rahul,kunal,"sw,ati"
rohan,rahul,"kun,al",swati
rohan,"rah,ul",kunal,swati
"ro,han",rahul,kunal,swati

the output should be
=============
rohan,rahul,kunal,swati

how can we achieve this ..
thanks in advance