title: Bash - adding values in row based on column
body: <p>The 2nd column in my csv file has duplicates. I want to add the associated values from column 1 based on those duplicates.</p>
  
  <p>Example csv : </p>
  
  <pre><code>56,  cc=DK
  49,  cc=US
  34,  cc=GB
  32,  cc=DE
  32,  cc=NZ
  31,  cc=DK
  31,  cc=GB
  31,  cc=GB
  </code></pre>
  
  <p>Example result : </p>
  
  <pre><code>96,  cc=GB # where 96 = 34+31+31
  87,  cc=DK # where 87 = 56+31
  32,  cc=DE
  32,  cc=NZ
  </code></pre>