Shell Script - CSV file change value of n'th column if column b contains the serach string
<p>There are a lot of questions on data processing on a CSV file. But all are specific.</p>

<p>I have comma separated CSV file. I have already done required operations but there is one step which i am still stuck at.</p>

<p>Please note i am looking to make this change using Shell Script. 'AWK' or 'SED' might help me but i lack the knowledge of correct syntax for this.</p>

<p>Input:</p>

<pre><code>Index,SrNo,Name,Desc,Target,Strength
1,125,RX,Big,NULL,236
2,246,DMT,Med,NULL,548
3,425,VT,SML,NULL,461
4,512,RX,Big,NULL,415
5,951,VT,SML,NULL,243
6,426,DMT,Med,NULL,412
</code></pre>

<p>I want to change the value of column 'Target' from NULL to 'ACTIVE' if The column 'NAME' is either 'RX' or 'DMT'.</p>

<p>Below is the expected output.</p>

<pre><code>Index,SrNo,Name,Desc,Target,Strength
1,125,RX,Big,Active,236
2,246,DMT,Med,Active,548
3,425,VT,SML,NULL,461
4,512,RX,Big,Active,415
5,951,VT,SML,NULL,243
6,426,DMT,Med,Active,412
</code></pre>