Modifying CSV files (with quotes) from shell scripts
<p>I have file Input-</p>

<p>Data-</p>

<pre><code>A,B,C
"C=abv,O=12,D=gbl,DC=ad,F=fgi,G=c",abc123, "D=12gkh,F=gfkhl,H=jk67"
"C=abv,O=12,D=gbl,DC=adc",abc123, "D=ntms,F=jk4,H=ks9"
"C=abv,O=12,D=gbl,DC=ad,F=fgi,G=c",abc123,
</code></pre>

<p>Expected Output</p>

<pre><code>B,C
abc123,"D=12gkh,F=gfkhl,H=jk67"
abc123,"D=ntms,F=jk4,H=ks9"
abc123,
</code></pre>

<ol>
<li><p>I want to delete the records from first column ,but unable to do because inside and outside field separator are same .</p></li>
<li><p>Also want to delete the rows where third column value is blank (like –abc123,)</p></li>
</ol>

<p>Tried with below sed solution ,     replaced start and end string and tried to delete the string upto 

<pre><code>cat file_name|sed -e :1 -e 's@\(&lt;ex&gt;[^(&lt;ex&gt;)]*\),\(.*&lt;ex&gt;\)@\1+\2@;t1'

cat file_|sed -e :1 -e 's@\(&lt;ex&gt;[^(&lt;/ex&gt;)]*\)&amp;\(.*&lt;/ex&gt;\)@\1+\2@;t1' 
</code></pre>