title: sort | uniq | xargs grep ... where lines contain spaces
body: <p>I have a comma delimited file "myfile.csv" where the 5th column is a date/time stamp. (mm/dd/yyyy hh:mm). <b>I need to list all the rows that contain duplicate dates (there are lots)</b></p>
  
  <p>I'm using a bash shell via cygwin for WinXP</p>
  
  <pre><code>$ cut -d, -f 5 myfile.csv | sort | uniq -d 
  </code></pre>
  
  <p>correctly returns a list of the duplicate dates</p>
  
  <pre><code>01/01/2005 00:22
  01/01/2005 00:37
  [snip]    
  02/29/2009 23:54
  </code></pre>
  
  <p>But I cannot figure out how to feed this to grep to give me all the rows.
  Obviously, I can't use <code>xargs</code> straight up since the output contains spaces.  I thought I could do <code>uniq -z -d</code> but for some reason, combining those flags causes uniq to (apparently) return nothing. </p>
  
  <p>So, given that</p>
  
  <pre><code> $ cut -d, -f 5 myfile.csv | sort | uniq -d -z | xargs -0 -I {} grep '{}' myfile.csv
  </code></pre>
  
  <p>doesn't work... what can I do?</p>
  
  <p>I know that I could do this in <code>perl</code> or another scripting language... but my stubborn nature insists that I should be able to do it in <code>bash</code> using standard commandline tools like <code>sort</code>, <code>uniq</code>, <code>find</code>, <code>grep</code>, <code>cut</code>, etc.</p>
  
  <p><b>Teach me, oh bash gurus.  How can I get the list of rows I need using typical cli tools?</b></p>