title: Extract email addresses from text file using regex with bash or command line
body: <p>How can I grep out only the email address using a regex from a file with multiple lines similar to this.  (a sql dump to be precise)</p>
  
  <p>Unfortunately I cannot just go back and dump the email column at this point.</p>
  
  <p>Example data:</p>
  
  <pre><code>62372,35896,1,cgreen,Chad,Green,cgreen@blah.com,123456789,0,,,,,,,,,3,Blah,,2013-05-02 17:42:31.659574,164842,,0,0
  </code></pre>
  
  <p>I have tried this but it did not work:</p>
  
  <pre><code>grep -o '[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}' file.csv
  </code></pre>