title: count the number of occurrences in a files for particular column using awk
body: <p>I have one file which has the below input </p>
  
  <pre><code>1,1_2_34_45.csv,2345
  2,1_2_34_45.csv,2345
  3,1_2_34_45.csv,2345
  4,1_2_34_46.csv,2346
  5,1_2_34_47.csv,2345
  </code></pre>
  
  <p>for that i need the following out put below</p>
  
  <pre><code>1_2_34_45.csv,2345,3
  1_2_34_46.csv,2346,1
  1_2_34_47.csv,2345,1
  </code></pre>
  
  <p>I have tried the below code </p>
  
  <pre><code> awk -F , '{a[$2]++ }END{for(i in a){print i,a[i]}}' table.txt &gt; count.txt
  </code></pre>
  
  <p>but it prints only count,$2 value but the other column details doesnt show up as desired output please help me</p>