title: Maximum number of characters in a field of a csv file using unix shell commands?
body: <p>I have a csv file.  In one of the fields, say the second field, I need to know maximum number of characters in that field.  For example, given the file below:</p>
  
  <pre><code>adf,jlkjl,lkjlk
  jf,j,lkjljk
  jlkj,lkejflkj,adfafef,
  jfje,jj,lkjlkj
  jjee,eeee,ereq
  </code></pre>
  
  <p>the answer would be 8 because row 3 has 8 characters in the second field.  I would like to integrate this into a bash script, so common unix command line programs are preferred.  Imaginary bonus points for explaining what the command is doing.</p>
  
  <p>EDIT: Here is what I have so far</p>
  
  <pre><code>cut --delimiter=, -f 2 test.csv | wc -m
  </code></pre>
  
  <p>This gives me the character count for all of the fields, not just one, so I still have progress to make.</p>